home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / tex-k / web2c.kpathsea-2.6.help < prev    next >
Text File  |  1995-01-09  |  135KB  |  4,708 lines

  1. ftp.cs.umb.edu:/pub/tex/web2c.kpathsea-2.6.help, 9jan95.
  2.  
  3. The version of kpathsea distributed with web2c-6.1 is kpathsea-1.8.
  4. It was released in April 1994.  The current version of kpathsea,
  5. kpathsea-2.6, has faster path searching, runtime configuration files,
  6. bug fixes, and other improvements (see kpathsea/NEWS).  Karl Berry
  7. will put out a new release of web2c in a month or so, but those who
  8. cannot wait to use the current version of kpathsea will find some help
  9. in this file.
  10.  
  11. You do not have to follow the instructions below to build web2c-6.1;
  12. it will build perfectly fine with the old kpathsea-1.8.  You should
  13. follow these instructions only if you want to take advantage of the
  14. new features in kpathsea-2.6 and you don't want to wait for the next
  15. release of web2c.  If you run into any problems, you will have to
  16. debug and fix them yourself.  You may send a message to the
  17. tex-k@cs.umb.edu mailing list if you need some more help, but do not
  18. expect to receive an answer unless someone who reads the list has
  19. encountered your problem before and takes the time to write a reply.
  20.  
  21. Follow these instructions to upgrade web2c-6.1 to kpathsea-2.6:
  22.  
  23. 1.  Fetch the tar files `web-6.1.tar.gz' and `web2c-6.1.tar.gz' from
  24.     your nearest CTAN archive.
  25.  
  26. 2.  Fetch as many of the following tar files, `dviljk-2.5.tar.gz',
  27.     `dvipsk-5.58f.tar.gz', and `xdvik-18f.tar.gz', as you need from
  28.     ftp://ftp.cs.umb.edu/private/tex.  They all contain the same
  29.     version of kpathsea so you can fetch whatever you want to build
  30.     in addition to web2c-6.1 (say, dvipsk-5.58f).
  31.  
  32. 3.  Unpack all of the tar files in the same directory.  You will have
  33.     several new directories: web2c-6.1 and one or more of dviljk-2.5,
  34.     dvipsk-5.58f, and xdvik-18f depending on how many tar files you
  35.     chose in step 2.
  36.  
  37. 4.  Pick any of the directories dviljk-2.5, dvipsk-5.58f, or
  38.     xdvik-18f and rename it to kpathsea-2.6:
  39.  
  40.     mv dvipsk-5.58f kpathsea-2.6
  41.  
  42. 5.  Combine all the rest of the programs you want to build into
  43.     kpathsea-2.6:
  44.  
  45.     mv dviljk-2.5/dviljk kpathsea-2.6
  46.     mv web2c-6.1/web2c kpathsea-2.6
  47.     mv xdvik-18f/xdvik kpathsea-2.6
  48.  
  49. 6.  You don't need the remaining files in web2c-6.1 or any of the
  50.     other directories besides kpathsea-2.6, so you can delete them if
  51.     you wish:
  52.  
  53.     rm -rf dviljk-2.5
  54.     rm -rf web2c-6.1
  55.     rm -rf xdvik-18f
  56.  
  57. 7.  Patch a few files in the web2c subdirectory.  The patch is
  58.     enclosed.  First move into kpathsea-2.6 and then apply the patch:
  59.  
  60.     cd kpathsea-2.6
  61.     patch -p -s < web2c.kpathsea-2.6.help
  62.  
  63.     You shouldn't get any output from the patch command unless an
  64.     error occurs.
  65.  
  66.     This patch was made so that it won't matter what you call the
  67.     directory containing the web2c subdirectory since you'll be inside
  68.     it before applying the patch.  If you don't like the name
  69.     kpathsea-2.6, you're welcome to pick another name in step 4.
  70.  
  71. 8.  You will have to edit the fmts variable in web2c/Makefile.in if
  72.     you want to build another format besides tex.fmt.  If you want to
  73.     build the latex format in `make -k all' below, you must have all
  74.     of the latex files installed somewhere in your TEXINPUTS (usually
  75.     /usr/local/lib/texmf/tex/latex209 or /usr/local/lib/tex/latex2e).
  76.     You may prefer to build and install TeX and MF first and then
  77.     build and install the most up to date latex files and format from
  78.     another directory.  After you finish step 9, ftp to your nearest
  79.     CTAN archive, fetch base.tar.gz and package.tar.gz from the
  80.     directory /tex-archive/macros/latex, unpack them, and read the
  81.     instructions therein for building the most up to date latex.
  82.  
  83. 9.  Now you are ready to build all of the programs that you've moved
  84.     into kpathsea-2.6 (dviljk, dvipsk, web2c, xdvik, etc.):
  85.  
  86.     cd kpathsea-2.6
  87.     ./configure
  88.     make -k all
  89.     make install
  90.  
  91.     Note that you can't say `make -k'; you have to say `make -k all'
  92.     to build the formats and man pages as well as the executables.
  93.  
  94. *** web2c/Makefile.in.save    Thu Feb  3 04:47:59 1994
  95. --- web2c/Makefile.in    Fri Dec 16 12:56:06 1994
  96. ***************
  97. *** 13,18 ****
  98.   
  99.   # Generic installation directories.
  100. ! prefix = /usr/local
  101. ! exec_prefix = $(prefix)
  102.   bindir = $(exec_prefix)/bin
  103.   scriptdir = $(bindir)
  104. --- 13,18 ----
  105.   
  106.   # Generic installation directories.
  107. ! prefix = @prefix@
  108. ! exec_prefix = @exec_prefix@
  109.   bindir = $(exec_prefix)/bin
  110.   scriptdir = $(bindir)
  111. ***************
  112. *** 75,81 ****
  113.   # description of each of these formats.
  114.   bases = mf.base cmmf.base
  115. ! fmts = tex.fmt latex.fmt 
  116. ! # slitex.fmt etex.fmt amslatex.fmt amstex.fmt texinfo.fmt inrstex.fmt
  117. ! # picplus.fmt
  118.   
  119.   # The name of the file that defines your local devices, for use with
  120. --- 75,81 ----
  121.   # description of each of these formats.
  122.   bases = mf.base cmmf.base
  123. ! fmts = tex.fmt
  124. ! # latex.fmt slitex.fmt etex.fmt amslatex.fmt amstex.fmt texinfo.fmt
  125. ! # inrstex.fmt picplus.fmt
  126.   
  127.   # The name of the file that defines your local devices, for use with
  128. ***************
  129. *** 124,131 ****
  130.   # Make `#include <X11/...>' and `-lX...' work.
  131.   # wlibs is substituted by web2c's configure, LIBS by general configure
  132. ! # routines, and the others by AC_FIND_XTRA.
  133. ! x_include_flags = @x_include_flags@
  134. ! x_lib_flags = @x_lib_flags@
  135. ! x_extra_libs = @x_extra_libs@
  136.   wlibs = @wlibs@
  137.   LIBS = @LIBS@ $(extralibs)
  138. --- 124,131 ----
  139.   # Make `#include <X11/...>' and `-lX...' work.
  140.   # wlibs is substituted by web2c's configure, LIBS by general configure
  141. ! # routines, and the others by AC_PATH_XTRA.
  142. ! x_include_flags = @X_CFLAGS@
  143. ! x_lib_flags = @X_LIBS@
  144. ! x_extra_libs = @X_EXTRA_LIBS@
  145.   wlibs = @wlibs@
  146.   LIBS = @LIBS@ $(extralibs)
  147. ***************
  148. *** 467,471 ****
  149.   
  150.   realclean distclean::
  151. !     rm -f Makefile config.status
  152.   
  153.   extraclean::
  154. --- 467,471 ----
  155.   
  156.   realclean distclean::
  157. !     rm -f Makefile config.status config.log config.cache
  158.   
  159.   extraclean::
  160. *** web2c/configure.in.save    Tue Feb  1 14:42:20 1994
  161. --- web2c/configure.in    Fri Dec 16 13:11:03 1994
  162. ***************
  163. *** 12,60 ****
  164.   sinclude(../kpathsea/common.ac)
  165.   
  166. - dnl Do something erroneous if the symbol we are testing is undefined.
  167. - define(user_sym_check, [AC_TEST_CPP(#include "$srcdir/lib/c-auto.h.in"
  168. - #ifndef $1
  169. - #include <nonexistxyz.kkk>
  170. - #endif
  171. - , $1=t
  172. - )])
  173.   AC_PROG_YACC
  174.   AC_PROG_LEX
  175. ! AC_LN_S
  176.   
  177. ! AC_RETSIGTYPE
  178.   
  179.   dnl These tests prevent reliable cross-compilation.  Sigh.
  180. ! AC_CHAR_UNSIGNED
  181.   AC_LONG_64_BITS
  182. ! AC_WORDS_BIGENDIAN
  183.   
  184.   dnl Must do this last, as the addition to DEFS in Autoconf 1.3 confuses
  185.   dnl the compiler.
  186. ! AC_DECLARE_YYTEXT
  187.   
  188. ! echo checking for window system libraries
  189. ! user_sym_check(SUNWIN)
  190. ! user_sym_check(XVIEWWIN)
  191. ! user_sym_check(X11WIN)
  192. ! user_sym_check(X10WIN)
  193. ! if test -n "$XVIEWWIN"; then
  194.     wlibs="-lxview -lolgx -lX11 $wlibs"
  195.     (cd $srcdir/mf/MFwindow; rm -f sun.c; $LN_S sun-xview.c sun.c)
  196.   fi
  197. ! if test -n "$X11WIN"; then
  198. !   AC_FIND_X
  199. !   AC_FIND_XTRA
  200. !   if test -z "$Xextlib"; then
  201. !     AC_HAVE_LIBRARY(Xext, Xextlib=-lXext)
  202. !   fi
  203. !   wlibs="-lXt $Xextlib -lX11 $wlibs"
  204.     (cd $srcdir/mf/MFwindow; rm -f x11.c; $LN_S x11-Xt.c x11.c)
  205.   fi
  206. ! if test -n "$X10WIN"; then
  207.     wlibs="-lX $wlibs"
  208.   fi
  209. ! if test -n "$SUNWIN"; then
  210.     wlibs="-lsuntool -lsunwindow -lpixrect $wlibs"
  211.     (cd $srcdir/mf/MFwindow; rm -f sun.c; $LN_S sun-sunview.c sun.c)
  212. --- 12,68 ----
  213.   sinclude(../kpathsea/common.ac)
  214.   
  215.   AC_PROG_YACC
  216.   AC_PROG_LEX
  217. ! AC_PROG_LN_S
  218.   
  219. ! AC_TYPE_SIGNAL
  220.   
  221.   dnl These tests prevent reliable cross-compilation.  Sigh.
  222. ! AC_C_CHAR_UNSIGNED
  223.   AC_LONG_64_BITS
  224. ! AC_C_BIGENDIAN
  225.   
  226.   dnl Must do this last, as the addition to DEFS in Autoconf 1.3 confuses
  227.   dnl the compiler.
  228. ! AC_DECL_YYTEXT
  229. ! dnl Check if lib/c-auto.h.in defines a preprocessor symbol.
  230. ! define(AC_KBSYM_CHECK, AC_EGREP_CPP(yes,
  231. ! [#include "$srcdir/lib/c-auto.h.in"
  232. ! #ifdef $1
  233. !   yes
  234. ! #endif
  235. ! ], $1=yes, $1=no))
  236. ! AC_MSG_CHECKING(for sunwindow libraries)
  237. ! AC_KBSYM_CHECK(SUNWIN)
  238. ! AC_MSG_RESULT($SUNWIN)
  239. ! AC_MSG_CHECKING(for xview libraries)
  240. ! AC_KBSYM_CHECK(XVIEWWIN)
  241. ! AC_MSG_RESULT($XVIEWWIN)
  242. ! AC_MSG_CHECKING(for X11 libraries)
  243. ! AC_KBSYM_CHECK(X11WIN)
  244. ! AC_MSG_RESULT($X11WIN)
  245. ! AC_MSG_CHECKING(for X10 libraries)
  246. ! AC_KBSYM_CHECK(X10WIN)
  247. ! AC_MSG_RESULT($X10WIN)
  248.   
  249. ! if test $XVIEWWIN = yes; then
  250.     wlibs="-lxview -lolgx -lX11 $wlibs"
  251.     (cd $srcdir/mf/MFwindow; rm -f sun.c; $LN_S sun-xview.c sun.c)
  252.   fi
  253. ! if test $X11WIN = yes; then
  254. !   AC_PATH_X
  255. !   AC_PATH_XTRA
  256. !   wlibs="-lXt $X_PRE_LIBS -lX11 $wlibs"
  257.     (cd $srcdir/mf/MFwindow; rm -f x11.c; $LN_S x11-Xt.c x11.c)
  258.   fi
  259. ! if test $X10WIN = yes; then
  260.     wlibs="-lX $wlibs"
  261.   fi
  262. ! if test $SUNWIN = yes; then
  263.     wlibs="-lsuntool -lsunwindow -lpixrect $wlibs"
  264.     (cd $srcdir/mf/MFwindow; rm -f sun.c; $LN_S sun-sunview.c sun.c)
  265. ***************
  266. *** 62,87 ****
  267.   AC_SUBST(wlibs)
  268.   
  269. ! echo checking for small TeX/MF/BibTeX
  270. ! # Do TeX first.
  271. ! # If `small' version is not wanted, do nothing -- make will copy the
  272. ! # default change file.
  273. ! user_sym_check(SMALLTeX)
  274. ! if test -n "$SMALLTeX"; then
  275. !   echo "(small TeX, creating tex/ctex.ch)"
  276.     (cd $srcdir/tex && rm -f ctex.ch && sed -f small.sed <tex.ch >ctex.ch)
  277.     AC_DEFINE(GLUERATIO_TYPE, float)
  278.   fi
  279.   
  280. ! # Metafont next.
  281. ! user_sym_check(SMALLMF)
  282. ! if test -n "$SMALLMF"; then
  283. !   echo "(small Metafont, creating mf/cmf.ch)"
  284.     (cd $srcdir/mf && rm -f cmf.ch && sed -f small.sed <mf.ch >cmf.ch)
  285.   fi
  286.   
  287. ! # And finally BibTeX.
  288. ! user_sym_check(SMALLBibTeX)
  289. ! if test -n "$SMALLBibTeX"; then
  290. !   echo "(small BibTeX, creating bibtex/cbibtex.ch)"
  291.     (cd $srcdir/bibtex \
  292.      && rm -f cbibtex.ch && sed -f small.sed <bibtex.ch >cbibtex.ch)
  293. --- 70,97 ----
  294.   AC_SUBST(wlibs)
  295.   
  296. ! dnl Do TeX first.
  297. ! dnl If `small' version is not wanted, do nothing -- make will copy the
  298. ! dnl default change file.
  299. ! AC_MSG_CHECKING(for small TeX)
  300. ! AC_KBSYM_CHECK(SMALLTeX)
  301. ! AC_MSG_RESULT($SMALLTeX)
  302. ! if test $SMALLTeX = yes; then
  303.     (cd $srcdir/tex && rm -f ctex.ch && sed -f small.sed <tex.ch >ctex.ch)
  304.     AC_DEFINE(GLUERATIO_TYPE, float)
  305.   fi
  306.   
  307. ! dnl Metafont next.
  308. ! AC_MSG_CHECKING(for small MF)
  309. ! AC_KBSYM_CHECK(SMALLMF)
  310. ! AC_MSG_RESULT($SMALLMF)
  311. ! if test $SMALLMF = yes; then
  312.     (cd $srcdir/mf && rm -f cmf.ch && sed -f small.sed <mf.ch >cmf.ch)
  313.   fi
  314.   
  315. ! dnl And finally BibTeX.
  316. ! AC_MSG_CHECKING(for small BibTeX)
  317. ! AC_KBSYM_CHECK(SMALLBibTeX)
  318. ! AC_MSG_RESULT($SMALLBibTeX)
  319. ! if test $SMALLBibTeX = yes; then
  320.     (cd $srcdir/bibtex \
  321.      && rm -f cbibtex.ch && sed -f small.sed <bibtex.ch >cbibtex.ch)
  322. *** web2c/configure.save    Tue Feb  1 14:42:36 1994
  323. --- web2c/configure    Thu Jan  5 15:12:44 1995
  324. ***************
  325. *** 1,131 ****
  326.   #!/bin/sh
  327.   # Guess values for system-dependent variables and create Makefiles.
  328. ! # Generated automatically using autoconf.
  329. ! # Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
  330.   
  331. ! # This program is free software; you can redistribute it and/or modify
  332. ! # it under the terms of the GNU General Public License as published by
  333. ! # the Free Software Foundation; either version 2, or (at your option)
  334. ! # any later version.
  335. ! # This program is distributed in the hope that it will be useful,
  336. ! # but WITHOUT ANY WARRANTY; without even the implied warranty of
  337. ! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  338. ! # GNU General Public License for more details.
  339. ! # You should have received a copy of the GNU General Public License
  340. ! # along with this program; if not, write to the Free Software
  341. ! # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  342. ! # Usage: configure [--srcdir=DIR] [--host=HOST] [--gas] [--nfp]
  343. ! #        [--prefix=PREFIX] [--exec-prefix=PREFIX] [--with-PACKAGE[=VALUE]]
  344. ! # Ignores all args except --srcdir, --prefix, --exec-prefix, and
  345. ! # --with-PACKAGE[=VALUE] unless this script has special code to handle it.
  346.   
  347. ! for arg
  348.   do
  349. -   # Handle --exec-prefix with a space before the argument.
  350. -   if test x$next_exec_prefix = xyes; then exec_prefix=$arg; next_exec_prefix=
  351. -   # Handle --host with a space before the argument.
  352. -   elif test x$next_host = xyes; then next_host=
  353. -   # Handle --prefix with a space before the argument.
  354. -   elif test x$next_prefix = xyes; then prefix=$arg; next_prefix=
  355. -   # Handle --srcdir with a space before the argument.
  356. -   elif test x$next_srcdir = xyes; then srcdir=$arg; next_srcdir=
  357. -   else
  358. -     case $arg in
  359. -      # For backward compatibility, recognize -exec-prefix and --exec_prefix.
  360. -      -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* | --exec=* | --exe=* | --ex=* | --e=*)
  361. -     exec_prefix=`echo $arg | sed 's/[-a-z_]*=//'` ;;
  362. -      -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- | --exec | --exe | --ex | --e)
  363. -     next_exec_prefix=yes ;;
  364. -      -gas | --gas | --ga | --g) ;;
  365. -      -host=* | --host=* | --hos=* | --ho=* | --h=*) ;;
  366. -      -host | --host | --hos | --ho | --h)
  367. -     next_host=yes ;;
  368. -      -nfp | --nfp | --nf) ;;
  369. -      -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  370. -     prefix=`echo $arg | sed 's/[-a-z_]*=//'` ;;
  371. -      -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  372. -     next_prefix=yes ;;
  373. -      -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=* | --s=*)
  374. -     srcdir=`echo $arg | sed 's/[-a-z_]*=//'` ;;
  375. -      -srcdir | --srcdir | --srcdi | --srcd | --src | --sr | --s)
  376. -     next_srcdir=yes ;;
  377. -      -with-* | --with-*)
  378. -        package=`echo $arg|sed -e 's/-*with-//' -e 's/=.*//'`
  379. -        # Reject names that aren't valid shell variable names.
  380. -        if test -n "`echo $package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  381. -          echo "configure: $package: invalid package name" >&2; exit 1
  382. -        fi
  383. -        package=`echo $package| sed 's/-/_/g'`
  384. -        case "$arg" in
  385. -          *=*) val="`echo $arg|sed 's/[^=]*=//'`" ;;
  386. -          *) val=1 ;;
  387. -        esac
  388. -        eval "with_$package='$val'" ;;
  389.   
  390. !      -v | -verbose | --verbose | --verbos | --verbo | --verb | --ver | --ve | --v)
  391. !        verbose=yes ;;
  392.   
  393. !      *) ;;
  394.       esac
  395. !   fi
  396.   done
  397.   
  398. ! trap 'rm -fr conftest* confdefs* core; exit 1' 1 3 15
  399. ! trap 'rm -f confdefs*' 0
  400.   
  401.   # NLS nuisances.
  402.   # These must not be set unconditionally because not all systems understand
  403.   # e.g. LANG=C (notably SCO).
  404. ! if test "${LC_ALL+set}" = 'set' ; then LC_ALL=C; export LC_ALL; fi
  405. ! if test "${LANG+set}"   = 'set' ; then LANG=C;   export LANG;   fi
  406.   
  407. ! rm -f conftest* confdefs.h
  408.   # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  409.   echo > confdefs.h
  410. - compile='${CC-cc} $CFLAGS conftest.c -o conftest $LIBS >/dev/null 2>&1'
  411.   
  412.   # A filename unique to this package, relative to the directory that
  413.   # configure is in, which we can look for to find out if srcdir is correct.
  414. ! unique_file=web2c/web2c.c
  415.   
  416.   # Find the source files, if location was not specified.
  417.   if test -z "$srcdir"; then
  418. !   srcdirdefaulted=yes
  419. !   # Try the directory containing this script, then `..'.
  420. !   prog=$0
  421. !   confdir=`echo $prog|sed 's%/[^/][^/]*$%%'`
  422. !   test "X$confdir" = "X$prog" && confdir=.
  423. !   srcdir=$confdir
  424. !   if test ! -r $srcdir/$unique_file; then
  425.       srcdir=..
  426.     fi
  427.   fi
  428. ! if test ! -r $srcdir/$unique_file; then
  429. !   if test x$srcdirdefaulted = xyes; then
  430. !     echo "configure: Can not find sources in \`${confdir}' or \`..'." 1>&2
  431.     else
  432. !     echo "configure: Can not find sources in \`${srcdir}'." 1>&2
  433.     fi
  434. !   exit 1
  435.   fi
  436. - # Preserve a srcdir of `.' to avoid automounter screwups with pwd.
  437. - # But we can't avoid them for `..', to make subdirectories work.
  438. - case $srcdir in
  439. -   .|/*|~*) ;;
  440. -   *) srcdir=`cd $srcdir; pwd` ;; # Make relative path absolute.
  441. - esac
  442.   
  443.   
  444. - # Save the original args to write them into config.status later.
  445. - configure_args="$*"
  446.   
  447.   
  448. --- 1,403 ----
  449.   #!/bin/sh
  450.   # Guess values for system-dependent variables and create Makefiles.
  451. ! # Generated automatically using autoconf version 2.1 
  452. ! # Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
  453. ! #
  454. ! # This configure script is free software; the Free Software Foundation
  455. ! # gives unlimited permission to copy, distribute and modify it.
  456. ! # Defaults:
  457. ! ac_help=
  458. ! ac_default_prefix=/usr/local
  459. ! # Any additions from configure.in:
  460. ! ac_help="$ac_help
  461. !   --with-x                use the X Window System"
  462. ! # Initialize some variables set by options.
  463. ! # The variables have the same names as the options, with
  464. ! # dashes changed to underlines.
  465. ! build=NONE
  466. ! cache_file=./config.cache
  467. ! exec_prefix=NONE
  468. ! host=NONE
  469. ! no_create=
  470. ! nonopt=NONE
  471. ! no_recursion=
  472. ! prefix=NONE
  473. ! program_prefix=NONE
  474. ! program_suffix=NONE
  475. ! program_transform_name=s,x,x,
  476. ! silent=
  477. ! site=
  478. ! srcdir=
  479. ! target=NONE
  480. ! verbose=
  481. ! x_includes=NONE
  482. ! x_libraries=NONE
  483.   
  484. ! # Initialize some other variables.
  485. ! subdirs=
  486.   
  487. ! ac_prev=
  488. ! for ac_option
  489.   do
  490.   
  491. !   # If the previous option needs an argument, assign it.
  492. !   if test -n "$ac_prev"; then
  493. !     eval "$ac_prev=\$ac_option"
  494. !     ac_prev=
  495. !     continue
  496. !   fi
  497. !   case "$ac_option" in
  498. !   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  499. !   *) ac_optarg= ;;
  500. !   esac
  501. !   # Accept the important Cygnus configure options, so we can diagnose typos.
  502. !   case "$ac_option" in
  503. !   -build | --build | --buil | --bui | --bu | --b)
  504. !     ac_prev=build ;;
  505. !   -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
  506. !     build="$ac_optarg" ;;
  507. !   -cache-file | --cache-file | --cache-fil | --cache-fi \
  508. !   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  509. !     ac_prev=cache_file ;;
  510. !   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  511. !   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  512. !     cache_file="$ac_optarg" ;;
  513. !   -disable-* | --disable-*)
  514. !     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  515. !     # Reject names that are not valid shell variable names.
  516. !     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  517. !       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  518. !     fi
  519. !     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  520. !     eval "enable_${ac_feature}=no" ;;
  521. !   -enable-* | --enable-*)
  522. !     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  523. !     # Reject names that are not valid shell variable names.
  524. !     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  525. !       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  526. !     fi
  527. !     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  528. !     case "$ac_option" in
  529. !       *=*) ;;
  530. !       *) ac_optarg=yes ;;
  531. !     esac
  532. !     eval "enable_${ac_feature}='$ac_optarg'" ;;
  533.   
  534. !   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  535. !   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  536. !   | --exec | --exe | --ex)
  537. !     ac_prev=exec_prefix ;;
  538. !   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  539. !   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  540. !   | --exec=* | --exe=* | --ex=*)
  541. !     exec_prefix="$ac_optarg" ;;
  542. !   -gas | --gas | --ga | --g)
  543. !     # Obsolete; use --with-gas.
  544. !     with_gas=yes ;;
  545. !   -help | --help | --hel | --he)
  546. !     # Omit some internal or obsolete options to make the list less imposing.
  547. !     # This message is too long to be a string in the A/UX 3.1 sh.
  548. !     cat << EOF
  549. ! Usage: configure [options] [host]
  550. ! Options: [defaults in brackets after descriptions]
  551. ! Configuration:
  552. !   --cache-file=FILE       cache test results in FILE
  553. !   --help                  print this message
  554. !   --no-create             do not create output files
  555. !   --quiet, --silent       do not print \`checking...' messages
  556. !   --version               print the version of autoconf that created configure
  557. ! Directory and file names:
  558. !   --prefix=PREFIX         install architecture-independent files in PREFIX
  559. !                           [$ac_default_prefix]
  560. !   --exec-prefix=PREFIX    install architecture-dependent files in PREFIX
  561. !                           [same as prefix]
  562. !   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  563. !   --program-prefix=PREFIX prepend PREFIX to installed program names
  564. !   --program-suffix=SUFFIX append SUFFIX to installed program names
  565. !   --program-transform-name=PROGRAM run sed PROGRAM on installed program names
  566. ! Host type:
  567. !   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  568. !   --host=HOST             configure for HOST [guessed]
  569. !   --target=TARGET         configure for TARGET [TARGET=HOST]
  570. ! Features and packages:
  571. !   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  572. !   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  573. !   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  574. !   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  575. !   --x-includes=DIR        X include files are in DIR
  576. !   --x-libraries=DIR       X library files are in DIR
  577. ! --enable and --with options recognized:$ac_help
  578. ! EOF
  579. !     exit 0 ;;
  580. !   -host | --host | --hos | --ho)
  581. !     ac_prev=host ;;
  582. !   -host=* | --host=* | --hos=* | --ho=*)
  583. !     host="$ac_optarg" ;;
  584. !   -nfp | --nfp | --nf)
  585. !     # Obsolete; use --without-fp.
  586. !     with_fp=no ;;
  587. !   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  588. !   | --no-cr | --no-c)
  589. !     no_create=yes ;;
  590. !   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  591. !   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  592. !     no_recursion=yes ;;
  593. !   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  594. !     ac_prev=prefix ;;
  595. !   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  596. !     prefix="$ac_optarg" ;;
  597. !   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  598. !   | --program-pre | --program-pr | --program-p)
  599. !     ac_prev=program_prefix ;;
  600. !   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  601. !   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  602. !     program_prefix="$ac_optarg" ;;
  603. !   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  604. !   | --program-suf | --program-su | --program-s)
  605. !     ac_prev=program_suffix ;;
  606. !   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  607. !   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  608. !     program_suffix="$ac_optarg" ;;
  609. !   -program-transform-name | --program-transform-name \
  610. !   | --program-transform-nam | --program-transform-na \
  611. !   | --program-transform-n | --program-transform- \
  612. !   | --program-transform | --program-transfor \
  613. !   | --program-transfo | --program-transf \
  614. !   | --program-trans | --program-tran \
  615. !   | --progr-tra | --program-tr | --program-t)
  616. !     ac_prev=program_transform_name ;;
  617. !   -program-transform-name=* | --program-transform-name=* \
  618. !   | --program-transform-nam=* | --program-transform-na=* \
  619. !   | --program-transform-n=* | --program-transform-=* \
  620. !   | --program-transform=* | --program-transfor=* \
  621. !   | --program-transfo=* | --program-transf=* \
  622. !   | --program-trans=* | --program-tran=* \
  623. !   | --progr-tra=* | --program-tr=* | --program-t=*)
  624. !     program_transform_name="$ac_optarg" ;;
  625. !   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  626. !   | -silent | --silent | --silen | --sile | --sil)
  627. !     silent=yes ;;
  628. !   -site | --site | --sit)
  629. !     ac_prev=site ;;
  630. !   -site=* | --site=* | --sit=*)
  631. !     site="$ac_optarg" ;;
  632. !   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  633. !     ac_prev=srcdir ;;
  634. !   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  635. !     srcdir="$ac_optarg" ;;
  636. !   -target | --target | --targe | --targ | --tar | --ta | --t)
  637. !     ac_prev=target ;;
  638. !   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  639. !     target="$ac_optarg" ;;
  640. !   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  641. !     verbose=yes ;;
  642. !   -version | --version | --versio | --versi | --vers)
  643. !     echo "configure generated by autoconf version 2.1"
  644. !     exit 0 ;;
  645. !   -with-* | --with-*)
  646. !     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  647. !     # Reject names that are not valid shell variable names.
  648. !     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  649. !       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  650. !     fi
  651. !     ac_package=`echo $ac_package| sed 's/-/_/g'`
  652. !     case "$ac_option" in
  653. !       *=*) ;;
  654. !       *) ac_optarg=yes ;;
  655.       esac
  656. !     eval "with_${ac_package}='$ac_optarg'" ;;
  657. !   -without-* | --without-*)
  658. !     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  659. !     # Reject names that are not valid shell variable names.
  660. !     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  661. !       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  662. !     fi
  663. !     ac_package=`echo $ac_package| sed 's/-/_/g'`
  664. !     eval "with_${ac_package}=no" ;;
  665. !   --x)
  666. !     # Obsolete; use --with-x.
  667. !     with_x=yes ;;
  668. !   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  669. !   | --x-incl | --x-inc | --x-in | --x-i)
  670. !     ac_prev=x_includes ;;
  671. !   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  672. !   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  673. !     x_includes="$ac_optarg" ;;
  674. !   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  675. !   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  676. !     ac_prev=x_libraries ;;
  677. !   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  678. !   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  679. !     x_libraries="$ac_optarg" ;;
  680. !   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  681. !     ;;
  682. !   *) 
  683. !     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  684. !       echo "configure: warning: $ac_option: invalid host type" 1>&2
  685. !     fi
  686. !     if test "x$nonopt" != xNONE; then
  687. !       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  688. !     fi
  689. !     nonopt="$ac_option"
  690. !     ;;
  691. !   esac
  692.   done
  693.   
  694. ! if test -n "$ac_prev"; then
  695. !   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  696. ! fi
  697. ! trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
  698. ! # File descriptor usage:
  699. ! # 0 unused; standard input
  700. ! # 1 file creation
  701. ! # 2 errors and warnings
  702. ! # 3 unused; some systems may open it to /dev/tty
  703. ! # 4 checking for... messages and results
  704. ! # 5 compiler messages saved in config.log
  705. ! if test "$silent" = yes; then
  706. !   exec 4>/dev/null
  707. ! else
  708. !   exec 4>&1
  709. ! fi
  710. ! exec 5>./config.log
  711. ! echo "\
  712. ! This file contains any messages produced by compilers while
  713. ! running configure, to aid debugging if configure makes a mistake.
  714. ! " 1>&5
  715. ! # Strip out --no-create and --no-recursion so they do not pile up.
  716. ! # Also quote any args containing shell metacharacters.
  717. ! ac_configure_args=
  718. ! for ac_arg
  719. ! do
  720. !   case "$ac_arg" in
  721. !   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  722. !   | --no-cr | --no-c) ;;
  723. !   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  724. !   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  725. !   *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  726. !   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  727. !   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  728. !   esac
  729. ! done
  730.   
  731.   # NLS nuisances.
  732. + # Only set LANG and LC_ALL to C if already set.
  733.   # These must not be set unconditionally because not all systems understand
  734.   # e.g. LANG=C (notably SCO).
  735. ! if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  736. ! if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  737.   
  738. ! # confdefs.h avoids OS command line length limits that DEFS can exceed.
  739. ! rm -rf conftest* confdefs.h
  740.   # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  741.   echo > confdefs.h
  742.   
  743.   # A filename unique to this package, relative to the directory that
  744.   # configure is in, which we can look for to find out if srcdir is correct.
  745. ! ac_unique_file=web2c/web2c.c
  746.   
  747.   # Find the source files, if location was not specified.
  748.   if test -z "$srcdir"; then
  749. !   ac_srcdir_defaulted=yes
  750. !   # Try the directory containing this script, then its parent.
  751. !   ac_prog=$0
  752. !   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  753. !   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  754. !   srcdir=$ac_confdir
  755. !   if test ! -r $srcdir/$ac_unique_file; then
  756.       srcdir=..
  757.     fi
  758. + else
  759. +   ac_srcdir_defaulted=no
  760. + fi
  761. + if test ! -r $srcdir/$ac_unique_file; then
  762. +   if test "$ac_srcdir_defaulted" = yes; then
  763. +     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  764. +   else
  765. +     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  766. +   fi
  767. + fi
  768. + srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  769. + # Prefer explicitly selected file to automatically selected ones.
  770. + if test -z "$CONFIG_SITE"; then
  771. +   if test "x$prefix" != xNONE; then
  772. +     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  773. +   else
  774. +     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  775. +   fi
  776. + fi
  777. + for ac_site_file in $CONFIG_SITE; do
  778. +   if test -r "$ac_site_file"; then
  779. +     echo "loading site script $ac_site_file"
  780. +     . "$ac_site_file"
  781. +   fi
  782. + done
  783. + if test -r "$cache_file"; then
  784. +   echo "loading cache $cache_file"
  785. +   . $cache_file
  786. + else
  787. +   echo "creating cache $cache_file"
  788. +   > $cache_file
  789.   fi
  790. ! ac_ext=c
  791. ! # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  792. ! ac_cpp='$CPP $CPPFLAGS'
  793. ! ac_compile='${CC-cc} $CFLAGS $CPPFLAGS conftest.$ac_ext -c 1>&5 2>&5'
  794. ! ac_link='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext -o conftest $LIBS 1>&5 2>&5'
  795. ! if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  796. !   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  797. !   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  798. !     ac_n= ac_c='
  799. ! ' ac_t='    '
  800.     else
  801. !     ac_n=-n ac_c= ac_t=
  802.     fi
  803. ! else
  804. !   ac_n= ac_c='\c' ac_t=
  805.   fi
  806.   
  807.   
  808.   
  809.   
  810. ***************
  811. *** 135,462 ****
  812.   
  813.   
  814.   
  815. ! if test -z "$CC"; then
  816. !   # Extract the first word of `gcc', so it can be a program name with args.
  817. !   set dummy gcc; word=$2
  818. !   echo checking for $word
  819. !   IFS="${IFS=     }"; saveifs="$IFS"; IFS="${IFS}:"
  820. !   for dir in $PATH; do
  821. !     test -z "$dir" && dir=.
  822. !     if test -f $dir/$word; then
  823. !       CC="gcc"
  824.         break
  825.       fi
  826.     done
  827. !   IFS="$saveifs"
  828.   fi
  829. - test -z "$CC" && CC="cc"
  830. - test -n "$CC" && test -n "$verbose" && echo "    setting CC to $CC"
  831.   
  832. ! # Find out if we are using GNU C, under whatever name.
  833. ! cat > conftest.c <<EOF
  834.   #ifdef __GNUC__
  835. !   yes
  836.   #endif
  837.   EOF
  838. ! ${CC-cc} -E conftest.c > conftest.out 2>&1
  839. ! if egrep yes conftest.out >/dev/null 2>&1; then
  840. !   GCC=1 # For later tests.
  841.   fi
  842. ! rm -f conftest*
  843. ! echo checking how to run the C preprocessor
  844. ! if test -z "$CPP"; then
  845. !   # This must be in double quotes, not single quotes, because CPP may get
  846. !   # substituted into the Makefile and ``${CC-cc}'' will simply confuse
  847. !   # make.  It must be expanded now.
  848. !   CPP="${CC-cc} -E"
  849. !   cat > conftest.c <<EOF
  850. ! #include "confdefs.h"
  851. ! #include <stdio.h>
  852. ! Syntax Error
  853. ! EOF
  854. ! err=`eval "($CPP conftest.c >/dev/null) 2>&1"`
  855. ! if test -z "$err"; then
  856. !   :
  857.   else
  858. !   rm -rf conftest*
  859. !   CPP=/lib/cpp
  860.   fi
  861.   rm -f conftest*
  862.   fi
  863. - test ".${verbose}" != "." && echo "    setting CPP to $CPP"
  864.   
  865. ! # Make sure to not get the incompatible SysV /etc/install and
  866. ! # /usr/sbin/install, which might be in PATH before a BSD-like install,
  867. ! # or the SunOS /usr/etc/install directory, or the AIX /bin/install,
  868. ! # or the AFS install, which mishandles nonexistent args, or
  869. ! # /usr/ucb/install on SVR4, which tries to use the nonexistent group
  870. ! # `staff'.  On most BSDish systems install is in /usr/bin, not /usr/ucb
  871. ! # anyway.  Sigh.
  872. ! if test "z${INSTALL}" = "z" ; then
  873. !   echo checking for install
  874. !   IFS="${IFS=     }"; saveifs="$IFS"; IFS="${IFS}:"
  875. !   for dir in $PATH; do
  876. !     test -z "$dir" && dir=.
  877. !     case $dir in
  878. !     /etc|/usr/sbin|/usr/etc|/usr/afsws/bin|/usr/ucb) ;;
  879.       *)
  880. !       if test -f $dir/installbsd; then
  881. !     INSTALL="$dir/installbsd -c" # OSF1
  882. !     INSTALL_PROGRAM='$(INSTALL)'
  883. !     INSTALL_DATA='$(INSTALL) -m 644'
  884. !     break
  885. !       fi
  886. !       if test -f $dir/install; then
  887. !     if grep dspmsg $dir/install >/dev/null 2>&1; then
  888. !       : # AIX
  889. !     else
  890. !       INSTALL="$dir/install -c"
  891. !       INSTALL_PROGRAM='$(INSTALL)'
  892. !       INSTALL_DATA='$(INSTALL) -m 644'
  893. !       break
  894.       fi
  895. !       fi
  896.         ;;
  897.       esac
  898.     done
  899. !   IFS="$saveifs"
  900.   fi
  901. ! INSTALL=${INSTALL-cp}
  902. ! test -n "$verbose" && echo "    setting INSTALL to $INSTALL"
  903. ! INSTALL_PROGRAM=${INSTALL_PROGRAM-'$(INSTALL)'}
  904. ! test -n "$verbose" && echo "    setting INSTALL_PROGRAM to $INSTALL_PROGRAM"
  905. ! INSTALL_DATA=${INSTALL_DATA-'$(INSTALL)'}
  906. ! test -n "$verbose" && echo "    setting INSTALL_DATA to $INSTALL_DATA"
  907. ! if test -z "$RANLIB"; then
  908. !   # Extract the first word of `ranlib', so it can be a program name with args.
  909. !   set dummy ranlib; word=$2
  910. !   echo checking for $word
  911. !   IFS="${IFS=     }"; saveifs="$IFS"; IFS="${IFS}:"
  912. !   for dir in $PATH; do
  913. !     test -z "$dir" && dir=.
  914. !     if test -f $dir/$word; then
  915. !       RANLIB="ranlib"
  916.         break
  917.       fi
  918.     done
  919. !   IFS="$saveifs"
  920.   fi
  921. - test -z "$RANLIB" && RANLIB=":"
  922. - test -n "$RANLIB" && test -n "$verbose" && echo "    setting RANLIB to $RANLIB"
  923.   
  924.   
  925. ! echo checking for POSIXized ISC
  926.   if test -d /etc/conf/kconfig.d &&
  927.     grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
  928.   then
  929. !   ISC=1 # If later tests want to check for ISC.
  930. !   
  931. ! {
  932. ! test -n "$verbose" && \
  933. ! echo "    defining _POSIX_SOURCE"
  934. ! echo "#define" _POSIX_SOURCE 1 >> confdefs.h
  935. ! DEFS="$DEFS -D_POSIX_SOURCE=1"
  936. ! SEDDEFS="${SEDDEFS}\${SEDdA}_POSIX_SOURCE\${SEDdB}_POSIX_SOURCE\${SEDdC}1\${SEDdD}
  937. ! \${SEDuA}_POSIX_SOURCE\${SEDuB}_POSIX_SOURCE\${SEDuC}1\${SEDuD}
  938. ! \${SEDeA}_POSIX_SOURCE\${SEDeB}_POSIX_SOURCE\${SEDeC}1\${SEDeD}
  939. ! "
  940. ! }
  941.   
  942. !   if test -n "$GCC"; then
  943.       CC="$CC -posix"
  944.     else
  945.       CC="$CC -Xp"
  946.     fi
  947.   fi
  948.   
  949.   
  950. ! echo checking for directory library header
  951. ! dirheader=
  952. ! if test -z "$dirheader"; then
  953. !   echo checking for dirent.h
  954. ! cat > conftest.c <<EOF
  955.   #include "confdefs.h"
  956.   #include <sys/types.h>
  957. ! #include <dirent.h>
  958. ! int main() { exit(0); }
  959. ! int t() { DIR *dirp = 0; }
  960.   EOF
  961. ! if eval $compile; then
  962.     rm -rf conftest*
  963. !   
  964. ! {
  965. ! test -n "$verbose" && \
  966. ! echo "    defining DIRENT"
  967. ! echo "#define" DIRENT 1 >> confdefs.h
  968. ! DEFS="$DEFS -DDIRENT=1"
  969. ! SEDDEFS="${SEDDEFS}\${SEDdA}DIRENT\${SEDdB}DIRENT\${SEDdC}1\${SEDdD}
  970. ! \${SEDuA}DIRENT\${SEDuB}DIRENT\${SEDuC}1\${SEDuD}
  971. ! \${SEDeA}DIRENT\${SEDeB}DIRENT\${SEDeC}1\${SEDeD}
  972. ! "
  973. ! }
  974. !  dirheader=dirent.h
  975.   fi
  976.   rm -f conftest*
  977.   fi
  978. ! if test -z "$dirheader"; then
  979. !   echo checking for sys/ndir.h
  980. ! cat > conftest.c <<EOF
  981.   #include "confdefs.h"
  982. ! #include <sys/types.h>
  983. ! #include <sys/ndir.h>
  984. ! int main() { exit(0); }
  985. ! int t() { DIR *dirp = 0; }
  986.   EOF
  987. ! if eval $compile; then
  988.     rm -rf conftest*
  989. !   
  990. ! {
  991. ! test -n "$verbose" && \
  992. ! echo "    defining SYSNDIR"
  993. ! echo "#define" SYSNDIR 1 >> confdefs.h
  994. ! DEFS="$DEFS -DSYSNDIR=1"
  995. ! SEDDEFS="${SEDDEFS}\${SEDdA}SYSNDIR\${SEDdB}SYSNDIR\${SEDdC}1\${SEDdD}
  996. ! \${SEDuA}SYSNDIR\${SEDuB}SYSNDIR\${SEDuC}1\${SEDuD}
  997. ! \${SEDeA}SYSNDIR\${SEDeB}SYSNDIR\${SEDeC}1\${SEDeD}
  998. ! "
  999. ! }
  1000. !  dirheader=sys/ndir.h
  1001.   fi
  1002.   rm -f conftest*
  1003.   fi
  1004. ! if test -z "$dirheader"; then
  1005. !   echo checking for sys/dir.h
  1006. ! cat > conftest.c <<EOF
  1007.   #include "confdefs.h"
  1008. ! #include <sys/types.h>
  1009. ! #include <sys/dir.h>
  1010. ! int main() { exit(0); }
  1011. ! int t() { DIR *dirp = 0; }
  1012.   EOF
  1013. ! if eval $compile; then
  1014.     rm -rf conftest*
  1015. !   
  1016. ! {
  1017. ! test -n "$verbose" && \
  1018. ! echo "    defining SYSDIR"
  1019. ! echo "#define" SYSDIR 1 >> confdefs.h
  1020. ! DEFS="$DEFS -DSYSDIR=1"
  1021. ! SEDDEFS="${SEDDEFS}\${SEDdA}SYSDIR\${SEDdB}SYSDIR\${SEDdC}1\${SEDdD}
  1022. ! \${SEDuA}SYSDIR\${SEDuB}SYSDIR\${SEDuC}1\${SEDuD}
  1023. ! \${SEDeA}SYSDIR\${SEDeB}SYSDIR\${SEDeC}1\${SEDeD}
  1024. ! "
  1025. ! }
  1026. !  dirheader=sys/dir.h
  1027.   fi
  1028.   rm -f conftest*
  1029.   fi
  1030. ! if test -z "$dirheader"; then
  1031. !   echo checking for ndir.h
  1032. ! cat > conftest.c <<EOF
  1033.   #include "confdefs.h"
  1034. ! #include <sys/types.h>
  1035. ! #include <ndir.h>
  1036. ! int main() { exit(0); }
  1037. ! int t() { DIR *dirp = 0; }
  1038.   EOF
  1039. ! if eval $compile; then
  1040.     rm -rf conftest*
  1041. !   
  1042. ! {
  1043. ! test -n "$verbose" && \
  1044. ! echo "    defining NDIR"
  1045. ! echo "#define" NDIR 1 >> confdefs.h
  1046. ! DEFS="$DEFS -DNDIR=1"
  1047. ! SEDDEFS="${SEDDEFS}\${SEDdA}NDIR\${SEDdB}NDIR\${SEDdC}1\${SEDdD}
  1048. ! \${SEDuA}NDIR\${SEDuB}NDIR\${SEDuC}1\${SEDuD}
  1049. ! \${SEDeA}NDIR\${SEDeB}NDIR\${SEDeC}1\${SEDeD}
  1050. ! "
  1051. ! }
  1052. !  dirheader=ndir.h
  1053.   fi
  1054.   rm -f conftest*
  1055.   fi
  1056.   
  1057. ! echo checking for closedir return value
  1058. ! cat > conftest.c <<EOF
  1059.   #include "confdefs.h"
  1060. ! #include <sys/types.h>
  1061. ! #include <$dirheader>
  1062. ! int closedir(); main() { exit(closedir(opendir(".")) != 0); }
  1063.   EOF
  1064. ! eval $compile
  1065.   if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1066. !   :
  1067.   else
  1068. !   
  1069. ! {
  1070. ! test -n "$verbose" && \
  1071. ! echo "    defining VOID_CLOSEDIR"
  1072. ! echo "#define" VOID_CLOSEDIR 1 >> confdefs.h
  1073. ! DEFS="$DEFS -DVOID_CLOSEDIR=1"
  1074. ! SEDDEFS="${SEDDEFS}\${SEDdA}VOID_CLOSEDIR\${SEDdB}VOID_CLOSEDIR\${SEDdC}1\${SEDdD}
  1075. ! \${SEDuA}VOID_CLOSEDIR\${SEDuB}VOID_CLOSEDIR\${SEDuC}1\${SEDuD}
  1076. ! \${SEDeA}VOID_CLOSEDIR\${SEDeB}VOID_CLOSEDIR\${SEDeC}1\${SEDeD}
  1077. ! "
  1078. ! }
  1079.   fi
  1080.   rm -fr conftest*
  1081.   
  1082. ! echo checking for Xenix
  1083. ! cat > conftest.c <<EOF
  1084.   #include "confdefs.h"
  1085. ! #if defined(M_XENIX) && !defined(M_UNIX)
  1086. !   yes
  1087. ! #endif
  1088.   EOF
  1089. ! eval "$CPP conftest.c > conftest.out 2>&1"
  1090. ! if egrep "yes" conftest.out >/dev/null 2>&1; then
  1091.     rm -rf conftest*
  1092. !   XENIX=1
  1093.   
  1094.   fi
  1095.   rm -f conftest*
  1096.   
  1097. - if test -n "$XENIX"; then
  1098. -   LIBS="$LIBS -lx"
  1099. -   case "$DEFS" in
  1100. -   *SYSNDIR*) ;;
  1101. -   *) LIBS="-ldir $LIBS" ;; # Make sure -ldir precedes any -lx.
  1102. -   esac
  1103.   fi
  1104.   
  1105. ! echo checking for ANSI C header files
  1106. ! cat > conftest.c <<EOF
  1107.   #include "confdefs.h"
  1108.   #include <stdlib.h>
  1109. - #include <stdarg.h>
  1110. - #include <string.h>
  1111. - #include <float.h>
  1112.   EOF
  1113. ! err=`eval "($CPP conftest.c >/dev/null) 2>&1"`
  1114. ! if test -z "$err"; then
  1115. !   rm -rf conftest*
  1116. !   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  1117. ! echo '#include "confdefs.h"
  1118. ! #include <string.h>' > conftest.c
  1119. ! eval "$CPP conftest.c > conftest.out 2>&1"
  1120. ! if egrep "memchr" conftest.out >/dev/null 2>&1; then
  1121.     rm -rf conftest*
  1122. !   # SGI's /bin/cc from Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  1123. ! cat > conftest.c <<EOF
  1124.   #include "confdefs.h"
  1125.   #include <ctype.h>
  1126.   #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  1127.   #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  1128. ! #define XOR(e,f) (((e) && !(f)) || (!(e) && (f)))
  1129.   int main () { int i; for (i = 0; i < 256; i++)
  1130.   if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  1131. --- 407,889 ----
  1132.   
  1133.   
  1134. + echo $ac_n "checking whether ${MAKE-make} sets \$MAKE""... $ac_c" 1>&4
  1135. + set dummy ${MAKE-make}; ac_make=$2
  1136. + if eval "test \"`echo '${'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
  1137. +   echo $ac_n "(cached) $ac_c" 1>&4
  1138. + else
  1139. +   cat > conftestmake <<\EOF
  1140. + all:
  1141. +     @echo 'ac_maketemp="${MAKE}"'
  1142. + EOF
  1143. + # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  1144. + eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
  1145. + if test -n "$ac_maketemp"; then
  1146. +   eval ac_cv_prog_make_${ac_make}_set=yes
  1147. + else
  1148. +   eval ac_cv_prog_make_${ac_make}_set=no
  1149. + fi
  1150. + rm -f conftestmake
  1151. + fi
  1152. + if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
  1153. +   echo "$ac_t""yes" 1>&4
  1154. +   SET_MAKE=
  1155. + else
  1156. +   echo "$ac_t""no" 1>&4
  1157. +   SET_MAKE="MAKE=${MAKE-make}"
  1158. + fi
  1159.   
  1160. ! # Extract the first word of "gcc", so it can be a program name with args.
  1161. ! set dummy gcc; ac_word=$2
  1162. ! echo $ac_n "checking for $ac_word""... $ac_c" 1>&4
  1163. ! if eval "test \"`echo '${'ac_cv_prog_CC'+set}'`\" = set"; then
  1164. !   echo $ac_n "(cached) $ac_c" 1>&4
  1165. ! else
  1166. !   if test -n "$CC"; then
  1167. !   ac_cv_prog_CC="$CC" # Let the user override the test.
  1168. ! else
  1169. !   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1170. !   for ac_dir in $PATH; do
  1171. !     test -z "$ac_dir" && ac_dir=.
  1172. !     if test -f $ac_dir/$ac_word; then
  1173. !       ac_cv_prog_CC="gcc"
  1174.         break
  1175.       fi
  1176.     done
  1177. !   IFS="$ac_save_ifs"
  1178. !   test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
  1179. ! fi
  1180. ! fi
  1181. ! CC="$ac_cv_prog_CC"
  1182. ! if test -n "$CC"; then
  1183. !   echo "$ac_t""$CC" 1>&4
  1184. ! else
  1185. !   echo "$ac_t""no" 1>&4
  1186.   fi
  1187.   
  1188. ! echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&4
  1189. ! if eval "test \"`echo '${'ac_cv_prog_gcc'+set}'`\" = set"; then
  1190. !   echo $ac_n "(cached) $ac_c" 1>&4
  1191. ! else
  1192. !   cat > conftest.c <<EOF
  1193.   #ifdef __GNUC__
  1194. !   yes;
  1195.   #endif
  1196.   EOF
  1197. ! if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
  1198. !   ac_cv_prog_gcc=yes
  1199. ! else
  1200. !   ac_cv_prog_gcc=no
  1201.   fi
  1202. ! fi
  1203. ! echo "$ac_t""$ac_cv_prog_gcc" 1>&4
  1204. ! if test $ac_cv_prog_gcc = yes; then
  1205. !   GCC=yes
  1206. !   if test "${CFLAGS+set}" != set; then
  1207. !     echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&4
  1208. ! if eval "test \"`echo '${'ac_cv_prog_gcc_g'+set}'`\" = set"; then
  1209. !   echo $ac_n "(cached) $ac_c" 1>&4
  1210.   else
  1211. !   echo 'void f(){}' > conftest.c
  1212. ! if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  1213. !   ac_cv_prog_gcc_g=yes
  1214. ! else
  1215. !   ac_cv_prog_gcc_g=no
  1216.   fi
  1217.   rm -f conftest*
  1218. + fi
  1219. +     echo "$ac_t""$ac_cv_prog_gcc_g" 1>&4
  1220. +     if test $ac_cv_prog_gcc_g = yes; then
  1221. +       CFLAGS="-g -O"
  1222. +     else
  1223. +       CFLAGS="-O"
  1224. +     fi
  1225. +   fi
  1226. + else
  1227. +   GCC=
  1228. +   test "${CFLAGS+set}" = set || CFLAGS="-g"
  1229.   fi
  1230.   
  1231. ! ac_aux_dir=
  1232. ! for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  1233. !   if test -f $ac_dir/install-sh; then
  1234. !     ac_aux_dir=$ac_dir
  1235. !     ac_install_sh="$ac_aux_dir/install-sh -c"
  1236. !     break
  1237. !   elif test -f $ac_dir/install.sh; then
  1238. !     ac_aux_dir=$ac_dir
  1239. !     ac_install_sh="$ac_aux_dir/install.sh -c"
  1240. !     break
  1241. !   fi
  1242. ! done
  1243. ! if test -z "$ac_aux_dir"; then
  1244. !   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
  1245. ! fi
  1246. ! ac_config_guess=$ac_aux_dir/config.guess
  1247. ! ac_config_sub=$ac_aux_dir/config.sub
  1248. ! ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  1249. ! # Find a good install program.  We prefer a C program (faster),
  1250. ! # so one script is as good as another.  But avoid the broken or
  1251. ! # incompatible versions:
  1252. ! # SysV /etc/install, /usr/sbin/install
  1253. ! # SunOS /usr/etc/install
  1254. ! # IRIX /sbin/install
  1255. ! # AIX /bin/install
  1256. ! # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  1257. ! # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  1258. ! # ./install, which can be erroneously created by make from ./install.sh.
  1259. ! echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&4
  1260. ! if test -z "$INSTALL"; then
  1261. ! if eval "test \"`echo '${'ac_cv_path_install'+set}'`\" = set"; then
  1262. !   echo $ac_n "(cached) $ac_c" 1>&4
  1263. ! else
  1264. !     IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1265. !   for ac_dir in $PATH; do
  1266. !     case "$ac_dir" in
  1267. !     ''|.|/etc|/usr/sbin|/usr/etc|/sbin|/usr/afsws/bin|/usr/ucb) ;;
  1268.       *)
  1269. !       # OSF1 and SCO ODT 3.0 have their own names for install.
  1270. !       for ac_prog in ginstall installbsd scoinst install; do
  1271. !         if test -f $ac_dir/$ac_prog; then
  1272. !       if test $ac_prog = install &&
  1273. !             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  1274. !         # AIX install.  It has an incompatible calling convention.
  1275. !         # OSF/1 installbsd also uses dspmsg, but is usable.
  1276. !         :
  1277. !       else
  1278. !         ac_cv_path_install="$ac_dir/$ac_prog -c"
  1279. !         break 2
  1280. !       fi
  1281.       fi
  1282. !       done
  1283.         ;;
  1284.       esac
  1285.     done
  1286. !   IFS="$ac_save_ifs"
  1287. !   # As a last resort, use the slow shell script.
  1288. !   test -z "$ac_cv_path_install" && ac_cv_path_install="$ac_install_sh"
  1289.   fi
  1290. !   INSTALL="$ac_cv_path_install"
  1291. ! fi
  1292. ! echo "$ac_t""$INSTALL" 1>&4
  1293. ! # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  1294. ! # It thinks the first close brace ends the variable substitution.
  1295. ! test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  1296. ! test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  1297. ! # Extract the first word of "ranlib", so it can be a program name with args.
  1298. ! set dummy ranlib; ac_word=$2
  1299. ! echo $ac_n "checking for $ac_word""... $ac_c" 1>&4
  1300. ! if eval "test \"`echo '${'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  1301. !   echo $ac_n "(cached) $ac_c" 1>&4
  1302. ! else
  1303. !   if test -n "$RANLIB"; then
  1304. !   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  1305. ! else
  1306. !   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1307. !   for ac_dir in $PATH; do
  1308. !     test -z "$ac_dir" && ac_dir=.
  1309. !     if test -f $ac_dir/$ac_word; then
  1310. !       ac_cv_prog_RANLIB="ranlib"
  1311.         break
  1312.       fi
  1313.     done
  1314. !   IFS="$ac_save_ifs"
  1315. !   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
  1316. ! fi
  1317. ! fi
  1318. ! RANLIB="$ac_cv_prog_RANLIB"
  1319. ! if test -n "$RANLIB"; then
  1320. !   echo "$ac_t""$RANLIB" 1>&4
  1321. ! else
  1322. !   echo "$ac_t""no" 1>&4
  1323.   fi
  1324.   
  1325.   
  1326. ! echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&4
  1327.   if test -d /etc/conf/kconfig.d &&
  1328.     grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
  1329.   then
  1330. !   echo "$ac_t""yes" 1>&4
  1331. !   ISC=yes # If later tests want to check for ISC.
  1332. !   cat >> confdefs.h <<\EOF
  1333. ! #define _POSIX_SOURCE 1
  1334. ! EOF
  1335.   
  1336. !   if test "$GCC" = yes; then
  1337.       CC="$CC -posix"
  1338.     else
  1339.       CC="$CC -Xp"
  1340.     fi
  1341. + else
  1342. +   echo "$ac_t""no" 1>&4
  1343. +   ISC=
  1344.   fi
  1345.   
  1346.   
  1347. ! ac_header_dirent=no
  1348. ! for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
  1349. ! do
  1350. ! ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  1351. ! echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&4
  1352. ! if eval "test \"`echo '${'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
  1353. !   echo $ac_n "(cached) $ac_c" 1>&4
  1354. ! else
  1355. !   cat > conftest.$ac_ext <<EOF
  1356. ! #line 639 "configure"
  1357.   #include "confdefs.h"
  1358.   #include <sys/types.h>
  1359. ! #include <$ac_hdr>
  1360. ! int main() { return 0; }
  1361. ! int t() {
  1362. ! DIR *dirp = 0;
  1363. ! ; return 0; }
  1364.   EOF
  1365. ! if eval $ac_compile; then
  1366.     rm -rf conftest*
  1367. !   eval "ac_cv_header_dirent_$ac_safe=yes"
  1368. ! else
  1369. !   rm -rf conftest*
  1370. !   eval "ac_cv_header_dirent_$ac_safe=no"
  1371.   fi
  1372.   rm -f conftest*
  1373. + fi
  1374. + if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
  1375. +   echo "$ac_t""yes" 1>&4
  1376. +     ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
  1377. +   cat >> confdefs.h <<EOF
  1378. + #define $ac_tr_hdr 1
  1379. + EOF
  1380. +  ac_header_dirent=$ac_hdr; break
  1381. + else
  1382. +   echo "$ac_t""no" 1>&4
  1383.   fi
  1384. ! done
  1385. ! # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
  1386. ! if test $ac_header_dirent = dirent.h; then
  1387. ! echo $ac_n "checking for -ldir""... $ac_c" 1>&4
  1388. ! if eval "test \"`echo '${'ac_cv_lib_dir'+set}'`\" = set"; then
  1389. !   echo $ac_n "(cached) $ac_c" 1>&4
  1390. ! else
  1391. !   ac_save_LIBS="$LIBS"
  1392. ! LIBS="$LIBS -ldir "
  1393. ! cat > conftest.$ac_ext <<EOF
  1394. ! #line 678 "configure"
  1395.   #include "confdefs.h"
  1396. ! int main() { return 0; }
  1397. ! int t() {
  1398. ! opendir()
  1399. ! ; return 0; }
  1400.   EOF
  1401. ! if eval $ac_link; then
  1402.     rm -rf conftest*
  1403. !   eval "ac_cv_lib_dir=yes"
  1404. ! else
  1405. !   rm -rf conftest*
  1406. !   eval "ac_cv_lib_dir=no"
  1407.   fi
  1408.   rm -f conftest*
  1409. + LIBS="$ac_save_LIBS"
  1410.   fi
  1411. ! if eval "test \"`echo '$ac_cv_lib_'dir`\" = yes"; then
  1412. !   echo "$ac_t""yes" 1>&4
  1413. !   LIBS="$LIBS -ldir"
  1414. ! else
  1415. !   echo "$ac_t""no" 1>&4
  1416. ! fi
  1417. ! else
  1418. ! echo $ac_n "checking for -lx""... $ac_c" 1>&4
  1419. ! if eval "test \"`echo '${'ac_cv_lib_x'+set}'`\" = set"; then
  1420. !   echo $ac_n "(cached) $ac_c" 1>&4
  1421. ! else
  1422. !   ac_save_LIBS="$LIBS"
  1423. ! LIBS="$LIBS -lx "
  1424. ! cat > conftest.$ac_ext <<EOF
  1425. ! #line 712 "configure"
  1426.   #include "confdefs.h"
  1427. ! int main() { return 0; }
  1428. ! int t() {
  1429. ! opendir()
  1430. ! ; return 0; }
  1431.   EOF
  1432. ! if eval $ac_link; then
  1433.     rm -rf conftest*
  1434. !   eval "ac_cv_lib_x=yes"
  1435. ! else
  1436. !   rm -rf conftest*
  1437. !   eval "ac_cv_lib_x=no"
  1438.   fi
  1439.   rm -f conftest*
  1440. + LIBS="$ac_save_LIBS"
  1441. + fi
  1442. + if eval "test \"`echo '$ac_cv_lib_'x`\" = yes"; then
  1443. +   echo "$ac_t""yes" 1>&4
  1444. +   LIBS="$LIBS -lx"
  1445. + else
  1446. +   echo "$ac_t""no" 1>&4
  1447.   fi
  1448. ! fi
  1449. ! echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&4
  1450. ! # On Suns, sometimes $CPP names a directory.
  1451. ! if test -n "$CPP" && test -d "$CPP"; then
  1452. !   CPP=
  1453. ! fi
  1454. ! if test -z "$CPP"; then
  1455. ! if eval "test \"`echo '${'ac_cv_prog_CPP'+set}'`\" = set"; then
  1456. !   echo $ac_n "(cached) $ac_c" 1>&4
  1457. ! else
  1458. !     # This must be in double quotes, not single quotes, because CPP may get
  1459. !   # substituted into the Makefile and "${CC-cc}" will confuse make.
  1460. !   CPP="${CC-cc} -E"
  1461. !   # On the NeXT, cc -E runs the code through the compiler's parser,
  1462. !   # not just through cpp.
  1463. !   cat > conftest.$ac_ext <<EOF
  1464. ! #line 755 "configure"
  1465.   #include "confdefs.h"
  1466. ! #include <assert.h>
  1467. ! Syntax Error
  1468.   EOF
  1469. ! eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1470. ! ac_err=`grep -v '^ *+' conftest.out`
  1471. ! if test -z "$ac_err"; then
  1472. !   :
  1473. ! else
  1474. !   echo "$ac_err" >&5
  1475.     rm -rf conftest*
  1476. !   CPP="${CC-cc} -E -traditional-cpp"
  1477. !   cat > conftest.$ac_ext <<EOF
  1478. ! #line 769 "configure"
  1479. ! #include "confdefs.h"
  1480. ! #include <assert.h>
  1481. ! Syntax Error
  1482. ! EOF
  1483. ! eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1484. ! ac_err=`grep -v '^ *+' conftest.out`
  1485. ! if test -z "$ac_err"; then
  1486. !   :
  1487. ! else
  1488. !   echo "$ac_err" >&5
  1489. !   rm -rf conftest*
  1490. !   CPP=/lib/cpp
  1491. ! fi
  1492. ! rm -f conftest*
  1493.   fi
  1494.   rm -f conftest*
  1495. +   ac_cv_prog_CPP="$CPP"
  1496.   fi
  1497. + fi
  1498. + CPP="$ac_cv_prog_CPP"
  1499. + echo "$ac_t""$CPP" 1>&4
  1500.   
  1501. ! # If we cannot run a trivial program, we must be cross compiling.
  1502. ! echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&4
  1503. ! if eval "test \"`echo '${'ac_cv_c_cross'+set}'`\" = set"; then
  1504. !   echo $ac_n "(cached) $ac_c" 1>&4
  1505. ! else
  1506. !   if test "$cross_compiling" = yes; then
  1507. !   ac_cv_cross=yes
  1508. ! else
  1509. ! cat > conftest.$ac_ext <<EOF
  1510. ! #line 801 "configure"
  1511.   #include "confdefs.h"
  1512. ! main(){return(0);}
  1513.   EOF
  1514. ! eval $ac_link
  1515.   if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1516. !   ac_cv_c_cross=no
  1517.   else
  1518. !   ac_cv_c_cross=yes
  1519. ! fi
  1520.   fi
  1521.   rm -fr conftest*
  1522. + fi
  1523. + cross_compiling=$ac_cv_c_cross
  1524. + echo "$ac_t""$ac_cv_c_cross" 1>&4
  1525.   
  1526. ! echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&4
  1527. ! if eval "test \"`echo '${'ac_cv_header_stdc'+set}'`\" = set"; then
  1528. !   echo $ac_n "(cached) $ac_c" 1>&4
  1529. ! else
  1530. !   cat > conftest.$ac_ext <<EOF
  1531. ! #line 822 "configure"
  1532.   #include "confdefs.h"
  1533. ! #include <stdlib.h>
  1534. ! #include <stdarg.h>
  1535. ! #include <string.h>
  1536. ! #include <float.h>
  1537.   EOF
  1538. ! eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1539. ! ac_err=`grep -v '^ *+' conftest.out`
  1540. ! if test -z "$ac_err"; then
  1541.     rm -rf conftest*
  1542. !   ac_cv_header_stdc=yes
  1543. ! else
  1544. !   echo "$ac_err" >&5
  1545. !   rm -rf conftest*
  1546. !   ac_cv_header_stdc=no
  1547. ! fi
  1548. ! rm -f conftest*
  1549.   
  1550. + if test $ac_cv_header_stdc = yes; then
  1551. +   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  1552. + cat > conftest.$ac_ext <<EOF
  1553. + #line 844 "configure"
  1554. + #include "confdefs.h"
  1555. + #include <string.h>
  1556. + EOF
  1557. + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1558. +   egrep "memchr" >/dev/null 2>&1; then
  1559. +   :
  1560. + else
  1561. +   rm -rf conftest*
  1562. +   ac_cv_header_stdc=no
  1563.   fi
  1564.   rm -f conftest*
  1565.   
  1566.   fi
  1567.   
  1568. ! if test $ac_cv_header_stdc = yes; then
  1569. !   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  1570. ! cat > conftest.$ac_ext <<EOF
  1571. ! #line 862 "configure"
  1572.   #include "confdefs.h"
  1573.   #include <stdlib.h>
  1574.   EOF
  1575. ! if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1576. !   egrep "free" >/dev/null 2>&1; then
  1577. !   :
  1578. ! else
  1579.     rm -rf conftest*
  1580. !   ac_cv_header_stdc=no
  1581. ! fi
  1582. ! rm -f conftest*
  1583. ! fi
  1584. ! if test $ac_cv_header_stdc = yes; then
  1585. !   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  1586. ! if test "$cross_compiling" = yes; then
  1587. !   ac_cv_header_stdc=no
  1588. ! else
  1589. ! cat > conftest.$ac_ext <<EOF
  1590. ! #line 883 "configure"
  1591.   #include "confdefs.h"
  1592.   #include <ctype.h>
  1593.   #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  1594.   #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  1595. ! #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  1596.   int main () { int i; for (i = 0; i < 256; i++)
  1597.   if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  1598. ***************
  1599. *** 464,566 ****
  1600.   
  1601.   EOF
  1602. ! eval $compile
  1603.   if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1604. !   
  1605. ! {
  1606. ! test -n "$verbose" && \
  1607. ! echo "    defining STDC_HEADERS"
  1608. ! echo "#define" STDC_HEADERS 1 >> confdefs.h
  1609. ! DEFS="$DEFS -DSTDC_HEADERS=1"
  1610. ! SEDDEFS="${SEDDEFS}\${SEDdA}STDC_HEADERS\${SEDdB}STDC_HEADERS\${SEDdC}1\${SEDdD}
  1611. ! \${SEDuA}STDC_HEADERS\${SEDuB}STDC_HEADERS\${SEDuC}1\${SEDuD}
  1612. ! \${SEDeA}STDC_HEADERS\${SEDeB}STDC_HEADERS\${SEDeC}1\${SEDeD}
  1613. ! "
  1614. ! }
  1615.   fi
  1616.   rm -fr conftest*
  1617.   
  1618.   fi
  1619. - rm -f conftest*
  1620.   
  1621.   
  1622.   fi
  1623. - rm -f conftest*
  1624.   
  1625. ! for hdr in assert.h float.h limits.h memory.h pwd.h stdlib.h \
  1626. !                 string.h unistd.h
  1627.   do
  1628. ! trhdr=HAVE_`echo $hdr | tr '[a-z]./' '[A-Z]__'`
  1629. ! echo checking for ${hdr}
  1630. ! cat > conftest.c <<EOF
  1631.   #include "confdefs.h"
  1632. ! #include <${hdr}>
  1633.   EOF
  1634. ! err=`eval "($CPP conftest.c >/dev/null) 2>&1"`
  1635. ! if test -z "$err"; then
  1636.     rm -rf conftest*
  1637. !   
  1638. ! {
  1639. ! test -n "$verbose" && \
  1640. ! echo "    defining ${trhdr}"
  1641. ! echo "#define" ${trhdr} 1 >> confdefs.h
  1642. ! DEFS="$DEFS -D${trhdr}=1"
  1643. ! SEDDEFS="${SEDDEFS}\${SEDdA}${trhdr}\${SEDdB}${trhdr}\${SEDdC}1\${SEDdD}
  1644. ! \${SEDuA}${trhdr}\${SEDuB}${trhdr}\${SEDuC}1\${SEDuD}
  1645. ! \${SEDeA}${trhdr}\${SEDeB}${trhdr}\${SEDeC}1\${SEDeD}
  1646. ! "
  1647. ! }
  1648.   fi
  1649.   rm -f conftest*
  1650.   done
  1651.   
  1652.   
  1653. ! for func in memmove putenv
  1654.   do
  1655. ! trfunc=HAVE_`echo $func | tr '[a-z]' '[A-Z]'`
  1656. ! echo checking for ${func}
  1657. ! cat > conftest.c <<EOF
  1658.   #include "confdefs.h"
  1659. ! #include <ctype.h>
  1660. ! int main() { exit(0); }
  1661. ! int t() { 
  1662.   /* The GNU C library defines this for functions which it implements
  1663.       to always fail with ENOSYS.  Some functions are actually named
  1664.       something starting with __ and the normal name is an alias.  */
  1665. ! #if defined (__stub_${func}) || defined (__stub___${func})
  1666.   choke me
  1667.   #else
  1668. ! /* Override any gcc2 internal prototype to avoid an error.  */
  1669. ! extern char ${func}(); ${func}();
  1670.   #endif
  1671. !  }
  1672.   EOF
  1673. ! if eval $compile; then
  1674.     rm -rf conftest*
  1675. !   {
  1676. ! test -n "$verbose" && \
  1677. ! echo "    defining ${trfunc}"
  1678. ! echo "#define" ${trfunc} 1 >> confdefs.h
  1679. ! DEFS="$DEFS -D${trfunc}=1"
  1680. ! SEDDEFS="${SEDDEFS}\${SEDdA}${trfunc}\${SEDdB}${trfunc}\${SEDdC}1\${SEDdD}
  1681. ! \${SEDuA}${trfunc}\${SEDuB}${trfunc}\${SEDuC}1\${SEDuD}
  1682. ! \${SEDeA}${trfunc}\${SEDeB}${trfunc}\${SEDeC}1\${SEDeD}
  1683. ! "
  1684. ! }
  1685.   fi
  1686.   rm -f conftest*
  1687.   done
  1688.   
  1689.   
  1690. ! prog='/* Ultrix mips cc rejects this.  */
  1691.   typedef int charset[2]; const charset x;
  1692.   /* SunOS 4.1.1 cc rejects this.  */
  1693.   char const *const *ccp;
  1694.   char **p;
  1695.   /* AIX XL C 1.02.0.0 rejects this.
  1696.      It does not let you subtract one const X* pointer from another in an arm
  1697. --- 891,1050 ----
  1698.   
  1699.   EOF
  1700. ! eval $ac_link
  1701.   if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1702. !   :
  1703. ! else
  1704. !   ac_cv_header_stdc=no
  1705. ! fi
  1706.   fi
  1707.   rm -fr conftest*
  1708. + fi
  1709. + fi
  1710. + echo "$ac_t""$ac_cv_header_stdc" 1>&4
  1711. + if test $ac_cv_header_stdc = yes; then
  1712. +   cat >> confdefs.h <<\EOF
  1713. + #define STDC_HEADERS 1
  1714. + EOF
  1715.   
  1716.   fi
  1717.   
  1718. + echo $ac_n "checking whether closedir returns void""... $ac_c" 1>&4
  1719. + if eval "test \"`echo '${'ac_cv_func_closedir_void'+set}'`\" = set"; then
  1720. +   echo $ac_n "(cached) $ac_c" 1>&4
  1721. + else
  1722. +   if test "$cross_compiling" = yes; then
  1723. +     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  1724. + else
  1725. + cat > conftest.$ac_ext <<EOF
  1726. + #line 920 "configure"
  1727. + #include "confdefs.h"
  1728. + #include <sys/types.h>
  1729. + #include <$ac_header_dirent>
  1730. + int closedir(); main() { exit(closedir(opendir(".")) != 0); }
  1731. + EOF
  1732. + eval $ac_link
  1733. + if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1734. +   ac_cv_func_closedir_void=no
  1735. + else
  1736. +   ac_cv_func_closedir_void=yes
  1737. + fi
  1738. + fi
  1739. + rm -fr conftest*
  1740. + fi
  1741. + echo "$ac_t""$ac_cv_func_closedir_void" 1>&4
  1742. + if test $ac_cv_func_closedir_void = yes; then
  1743. +   cat >> confdefs.h <<\EOF
  1744. + #define CLOSEDIR_VOID 1
  1745. + EOF
  1746.   
  1747.   fi
  1748.   
  1749. ! for ac_hdr in assert.h float.h limits.h memory.h pwd.h stdlib.h \
  1750. !                  string.h unistd.h
  1751.   do
  1752. ! ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  1753. ! echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&4
  1754. ! if eval "test \"`echo '${'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1755. !   echo $ac_n "(cached) $ac_c" 1>&4
  1756. ! else
  1757. !   cat > conftest.$ac_ext <<EOF
  1758. ! #line 952 "configure"
  1759.   #include "confdefs.h"
  1760. ! #include <$ac_hdr>
  1761.   EOF
  1762. ! eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1763. ! ac_err=`grep -v '^ *+' conftest.out`
  1764. ! if test -z "$ac_err"; then
  1765.     rm -rf conftest*
  1766. !   eval "ac_cv_header_$ac_safe=yes"
  1767. ! else
  1768. !   echo "$ac_err" >&5
  1769. !   rm -rf conftest*
  1770. !   eval "ac_cv_header_$ac_safe=no"
  1771.   fi
  1772.   rm -f conftest*
  1773. + fi
  1774. + if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1775. +   echo "$ac_t""yes" 1>&4
  1776. +     ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
  1777. +   cat >> confdefs.h <<EOF
  1778. + #define $ac_tr_hdr 1
  1779. + EOF
  1780. +  
  1781. + else
  1782. +   echo "$ac_t""no" 1>&4
  1783. + fi
  1784.   done
  1785.   
  1786.   
  1787. ! for ac_func in basename bcopy memmove putenv
  1788.   do
  1789. ! echo $ac_n "checking for $ac_func""... $ac_c" 1>&4
  1790. ! if eval "test \"`echo '${'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1791. !   echo $ac_n "(cached) $ac_c" 1>&4
  1792. ! else
  1793. !   cat > conftest.$ac_ext <<EOF
  1794. ! #line 988 "configure"
  1795.   #include "confdefs.h"
  1796. ! #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  1797. ! /* Override any gcc2 internal prototype to avoid an error.  */
  1798. ! char $ac_func(); 
  1799. ! int main() { return 0; }
  1800. ! int t() {
  1801.   /* The GNU C library defines this for functions which it implements
  1802.       to always fail with ENOSYS.  Some functions are actually named
  1803.       something starting with __ and the normal name is an alias.  */
  1804. ! #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1805.   choke me
  1806.   #else
  1807. ! $ac_func();
  1808.   #endif
  1809. ! ; return 0; }
  1810.   EOF
  1811. ! if eval $ac_link; then
  1812.     rm -rf conftest*
  1813. !   eval "ac_cv_func_$ac_func=yes"
  1814. ! else
  1815. !   rm -rf conftest*
  1816. !   eval "ac_cv_func_$ac_func=no"
  1817.   fi
  1818.   rm -f conftest*
  1819. + fi
  1820. + if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1821. +   echo "$ac_t""yes" 1>&4
  1822. +     ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
  1823. +   cat >> confdefs.h <<EOF
  1824. + #define $ac_tr_func 1
  1825. + EOF
  1826. +  
  1827. + else
  1828. +   echo "$ac_t""no" 1>&4
  1829. + fi
  1830.   done
  1831.   
  1832.   
  1833. ! echo $ac_n "checking for working const""... $ac_c" 1>&4
  1834. ! if eval "test \"`echo '${'ac_cv_c_const'+set}'`\" = set"; then
  1835. !   echo $ac_n "(cached) $ac_c" 1>&4
  1836. ! else
  1837. !   cat > conftest.$ac_ext <<EOF
  1838. ! #line 1036 "configure"
  1839. ! #include "confdefs.h"
  1840. ! int main() { return 0; }
  1841. ! int t() {
  1842. ! /* Ultrix mips cc rejects this.  */
  1843.   typedef int charset[2]; const charset x;
  1844.   /* SunOS 4.1.1 cc rejects this.  */
  1845.   char const *const *ccp;
  1846.   char **p;
  1847. + /* NEC SVR4.0.2 mips cc rejects this.  */
  1848. + struct point {int x, y;};
  1849. + static struct point const zero;
  1850.   /* AIX XL C 1.02.0.0 rejects this.
  1851.      It does not let you subtract one const X* pointer from another in an arm
  1852. ***************
  1853. *** 579,583 ****
  1854.   }
  1855.   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  1856. !   int x[] = {25,17};
  1857.     const int *foo = &x[0];
  1858.     ++foo;
  1859. --- 1063,1067 ----
  1860.   }
  1861.   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  1862. !   int x[] = {25, 17};
  1863.     const int *foo = &x[0];
  1864.     ++foo;
  1865. ***************
  1866. *** 595,647 ****
  1867.   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  1868.     const int foo = 10;
  1869. ! }'
  1870. ! echo checking for lack of working const
  1871. ! cat > conftest.c <<EOF
  1872. ! #include "confdefs.h"
  1873.   
  1874. ! int main() { exit(0); }
  1875. ! int t() { $prog }
  1876.   EOF
  1877. ! if eval $compile; then
  1878. !   :
  1879.   else
  1880.     rm -rf conftest*
  1881. !   
  1882. ! {
  1883. ! test -n "$verbose" && \
  1884. ! echo "    defining" const to be empty
  1885. ! echo "#define" const  >> confdefs.h
  1886. ! DEFS="$DEFS -Dconst="
  1887. ! SEDDEFS="${SEDDEFS}\${SEDdA}const\${SEDdB}const\${SEDdC}\${SEDdD}
  1888. ! \${SEDuA}const\${SEDuB}const\${SEDuC}\${SEDuD}
  1889. ! \${SEDeA}const\${SEDeB}const\${SEDeC}\${SEDeD}
  1890. ! "
  1891. ! }
  1892.   
  1893.   fi
  1894.   rm -f conftest*
  1895.   
  1896.   
  1897.   
  1898.   
  1899.   
  1900. ! for p in 'bison -y' byacc
  1901.   do
  1902. ! if test -z "$YACC"; then
  1903. !   # Extract the first word of `$p', so it can be a program name with args.
  1904. !   set dummy $p; word=$2
  1905. !   echo checking for $word
  1906. !   IFS="${IFS=     }"; saveifs="$IFS"; IFS="${IFS}:"
  1907. !   for dir in $PATH; do
  1908. !     test -z "$dir" && dir=.
  1909. !     if test -f $dir/$word; then
  1910. !       YACC="$p"
  1911.         break
  1912.       fi
  1913.     done
  1914. !   IFS="$saveifs"
  1915.   fi
  1916. - test -n "$YACC" && test -n "$verbose" && echo "    setting YACC to $YACC"
  1917.   
  1918.   test -n "$YACC" && break
  1919. --- 1079,1250 ----
  1920.   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  1921.     const int foo = 10;
  1922. ! }
  1923.   
  1924. ! ; return 0; }
  1925.   EOF
  1926. ! if eval $ac_compile; then
  1927. !   rm -rf conftest*
  1928. !   ac_cv_c_const=yes
  1929.   else
  1930.     rm -rf conftest*
  1931. !   ac_cv_c_const=no
  1932. ! fi
  1933. ! rm -f conftest*
  1934. ! fi
  1935. ! echo "$ac_t""$ac_cv_c_const" 1>&4
  1936. ! if test $ac_cv_c_const = no; then
  1937. !   cat >> confdefs.h <<\EOF
  1938. ! #define const 
  1939. ! EOF
  1940. ! fi
  1941. ! # This is a GNU libc invention.
  1942. ! echo $ac_n "checking whether program_invocation_name is predefined""... $ac_c" 1>&4
  1943. ! if eval "test \"`echo '${'kb_cv_var_program_inv_name'+set}'`\" = set"; then
  1944. !   echo $ac_n "(cached) $ac_c" 1>&4
  1945. ! else
  1946. !   cat > conftest.$ac_ext <<EOF
  1947. ! #line 1112 "configure"
  1948. ! #include "confdefs.h"
  1949.   
  1950. + int main() { return 0; }
  1951. + int t() {
  1952. + main() { program_invocation_name = "love"; }
  1953. + ; return 0; }
  1954. + EOF
  1955. + if eval $ac_link; then
  1956. +   rm -rf conftest*
  1957. +   kb_cv_var_program_inv_name=yes
  1958. + else
  1959. +   rm -rf conftest*
  1960. +   kb_cv_var_program_inv_name=no
  1961.   fi
  1962.   rm -f conftest*
  1963.   
  1964. + fi
  1965. + echo "$ac_t""$kb_cv_var_program_inv_name" 1>&4
  1966. + if test $kb_cv_var_program_inv_name = yes; then
  1967. +   cat >> confdefs.h <<\EOF
  1968. + #define HAVE_PROGRAM_INVOCATION_NAME 1
  1969. + EOF
  1970. + fi
  1971.   
  1972. + # Some BSD putenv's, e.g., FreeBSD, do malloc/free's on the environment.
  1973. + # This test program is due to Mike Hibler <mike@cs.utah.edu>.
  1974. + # We don't actually need to run this if we don't have putenv, but it
  1975. + # doesn't hurt.
  1976. + echo $ac_n "checking whether putenv uses malloc""... $ac_c" 1>&4
  1977. + if eval "test \"`echo '${'kb_cv_func_putenv_malloc'+set}'`\" = set"; then
  1978. +   echo $ac_n "(cached) $ac_c" 1>&4
  1979. + else
  1980. +   if test "$cross_compiling" = yes; then
  1981. +   kb_cv_func_putenv_malloc=no
  1982. + else
  1983. + cat > conftest.$ac_ext <<EOF
  1984. + #line 1151 "configure"
  1985. + #include "confdefs.h"
  1986. + #define VAR    "YOW_VAR"
  1987. + #define STRING1 "GabbaGabbaHey"
  1988. + #define STRING2 "Yow!!"        /* should be shorter than STRING1 */
  1989. + extern char *getenv (); /* in case char* and int don't mix gracefully */
  1990. + main ()
  1991. + {
  1992. +   char *str1, *rstr1, *str2, *rstr2;
  1993. +   str1 = getenv (VAR);
  1994. +   if (str1)
  1995. +     exit (1);
  1996. +   str1 = malloc (strlen (VAR) + 1 + strlen (STRING1) + 1);
  1997. +   if (str1 == 0)
  1998. +     exit (2);
  1999. +   strcpy (str1, VAR);
  2000. +   strcat (str1, "=");
  2001. +   strcat (str1, STRING1);
  2002. +   if (putenv (str1) < 0)
  2003. +     exit (3);
  2004. +   rstr1 = getenv (VAR);
  2005. +   if (rstr1 == 0)
  2006. +     exit (4);
  2007. +   rstr1 -= strlen (VAR) + 1;
  2008. +   if (strncmp (rstr1, VAR, strlen (VAR)))
  2009. +     exit (5);
  2010. +   str2 = malloc (strlen (VAR) + 1 + strlen (STRING2) + 1);
  2011. +   if (str2 == 0 || str1 == str2)
  2012. +     exit (6);
  2013. +   strcpy (str2, VAR);
  2014. +   strcat (str2, "=");
  2015. +   strcat (str2, STRING2);
  2016. +   if (putenv (str2) < 0)
  2017. +     exit (7);
  2018. +   rstr2 = getenv (VAR);
  2019. +   if (rstr2 == 0)
  2020. +     exit (8);
  2021. +   rstr2 -= strlen (VAR) + 1;
  2022. + #if 0
  2023. +   printf ("rstr1=0x%x, rstr2=0x%x\n", rstr1, rstr2);
  2024. +   /*
  2025. +    * If string from first call was reused for the second call,
  2026. +    * you had better not do a free on the first string!
  2027. +    */
  2028. +   if (rstr1 == rstr2)
  2029. +           printf ("#define SMART_PUTENV\n");
  2030. +   else
  2031. +           printf ("#undef SMART_PUTENV\n");
  2032. + #endif
  2033. +   exit (rstr1 == rstr2 ? 0 : 1);
  2034. + }
  2035. + EOF
  2036. + eval $ac_link
  2037. + if test -s conftest && (./conftest; exit) 2>/dev/null; then
  2038. +   kb_cv_func_putenv_malloc=yes
  2039. + else
  2040. +   kb_cv_func_putenv_malloc=no
  2041. + fi
  2042. + fi
  2043. + rm -fr conftest*
  2044. + fi
  2045. + echo "$ac_t""$kb_cv_func_putenv_malloc" 1>&4
  2046. + if test $kb_cv_func_putenv_malloc = yes; then
  2047. +   cat >> confdefs.h <<\EOF
  2048. + #define SMART_PUTENV 1
  2049. + EOF
  2050.   
  2051. + fi
  2052.   
  2053.   
  2054. ! for ac_prog in 'bison -y' byacc
  2055.   do
  2056. ! # Extract the first word of "$ac_prog", so it can be a program name with args.
  2057. ! set dummy $ac_prog; ac_word=$2
  2058. ! echo $ac_n "checking for $ac_word""... $ac_c" 1>&4
  2059. ! if eval "test \"`echo '${'ac_cv_prog_YACC'+set}'`\" = set"; then
  2060. !   echo $ac_n "(cached) $ac_c" 1>&4
  2061. ! else
  2062. !   if test -n "$YACC"; then
  2063. !   ac_cv_prog_YACC="$YACC" # Let the user override the test.
  2064. ! else
  2065. !   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  2066. !   for ac_dir in $PATH; do
  2067. !     test -z "$ac_dir" && ac_dir=.
  2068. !     if test -f $ac_dir/$ac_word; then
  2069. !       ac_cv_prog_YACC="$ac_prog"
  2070.         break
  2071.       fi
  2072.     done
  2073. !   IFS="$ac_save_ifs"
  2074. ! fi
  2075. ! fi
  2076. ! YACC="$ac_cv_prog_YACC"
  2077. ! if test -n "$YACC"; then
  2078. !   echo "$ac_t""$YACC" 1>&4
  2079. ! else
  2080. !   echo "$ac_t""no" 1>&4
  2081.   fi
  2082.   
  2083.   test -n "$YACC" && break
  2084. ***************
  2085. *** 649,713 ****
  2086.   test -n "$YACC" || YACC="yacc"
  2087.   
  2088. ! if test -z "$LEX"; then
  2089. !   # Extract the first word of `flex', so it can be a program name with args.
  2090. !   set dummy flex; word=$2
  2091. !   echo checking for $word
  2092. !   IFS="${IFS=     }"; saveifs="$IFS"; IFS="${IFS}:"
  2093. !   for dir in $PATH; do
  2094. !     test -z "$dir" && dir=.
  2095. !     if test -f $dir/$word; then
  2096. !       LEX="flex"
  2097.         break
  2098.       fi
  2099.     done
  2100. !   IFS="$saveifs"
  2101.   fi
  2102. - test -z "$LEX" && LEX="lex"
  2103. - test -n "$LEX" && test -n "$verbose" && echo "    setting LEX to $LEX"
  2104.   
  2105.   if test -z "$LEXLIB"
  2106.   then
  2107.     case "$LEX" in
  2108. !   flex*) LIBS_save="${LIBS}"
  2109. ! LIBS="${LIBS} -lfl"
  2110. ! have_lib=""
  2111. ! echo checking for -lfl
  2112. ! cat > conftest.c <<EOF
  2113.   #include "confdefs.h"
  2114.   
  2115. ! int main() { exit(0); }
  2116. ! int t() { main(); }
  2117.   EOF
  2118. ! if eval $compile; then
  2119.     rm -rf conftest*
  2120. !   have_lib="1"
  2121.   fi
  2122.   rm -f conftest*
  2123. ! LIBS="${LIBS_save}"
  2124. ! if test -n "${have_lib}"; then
  2125. !    :; LEXLIB="-lfl"
  2126.   else
  2127. !    :; 
  2128.   fi
  2129. !  ;;
  2130. !   *) LEXLIB="-ll" ;;
  2131. !   esac
  2132.   fi
  2133.   
  2134. ! echo checking for ln -s
  2135. ! rm -f conftestdata
  2136.   if ln -s X conftestdata 2>/dev/null
  2137.   then
  2138.     rm -f conftestdata
  2139. !   LN_S="ln -s"
  2140.   else
  2141. !   LN_S=ln
  2142.   fi
  2143.   
  2144.   
  2145. ! echo checking for return type of signal handlers
  2146. ! cat > conftest.c <<EOF
  2147.   #include "confdefs.h"
  2148.   #include <sys/types.h>
  2149. --- 1252,1351 ----
  2150.   test -n "$YACC" || YACC="yacc"
  2151.   
  2152. ! # Extract the first word of "flex", so it can be a program name with args.
  2153. ! set dummy flex; ac_word=$2
  2154. ! echo $ac_n "checking for $ac_word""... $ac_c" 1>&4
  2155. ! if eval "test \"`echo '${'ac_cv_prog_LEX'+set}'`\" = set"; then
  2156. !   echo $ac_n "(cached) $ac_c" 1>&4
  2157. ! else
  2158. !   if test -n "$LEX"; then
  2159. !   ac_cv_prog_LEX="$LEX" # Let the user override the test.
  2160. ! else
  2161. !   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  2162. !   for ac_dir in $PATH; do
  2163. !     test -z "$ac_dir" && ac_dir=.
  2164. !     if test -f $ac_dir/$ac_word; then
  2165. !       ac_cv_prog_LEX="flex"
  2166.         break
  2167.       fi
  2168.     done
  2169. !   IFS="$ac_save_ifs"
  2170. !   test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
  2171. ! fi
  2172. ! fi
  2173. ! LEX="$ac_cv_prog_LEX"
  2174. ! if test -n "$LEX"; then
  2175. !   echo "$ac_t""$LEX" 1>&4
  2176. ! else
  2177. !   echo "$ac_t""no" 1>&4
  2178.   fi
  2179.   
  2180.   if test -z "$LEXLIB"
  2181.   then
  2182.     case "$LEX" in
  2183. !   flex*) ac_lib=fl ;;
  2184. !   *) ac_lib=l ;;
  2185. !   esac
  2186. !   echo $ac_n "checking for -l$ac_lib""... $ac_c" 1>&4
  2187. ! if eval "test \"`echo '${'ac_cv_lib_$ac_lib'+set}'`\" = set"; then
  2188. !   echo $ac_n "(cached) $ac_c" 1>&4
  2189. ! else
  2190. !   ac_save_LIBS="$LIBS"
  2191. ! LIBS="$LIBS -l$ac_lib "
  2192. ! cat > conftest.$ac_ext <<EOF
  2193. ! #line 1296 "configure"
  2194.   #include "confdefs.h"
  2195.   
  2196. ! int main() { return 0; }
  2197. ! int t() {
  2198. ! main()
  2199. ! ; return 0; }
  2200.   EOF
  2201. ! if eval $ac_link; then
  2202.     rm -rf conftest*
  2203. !   eval "ac_cv_lib_$ac_lib=yes"
  2204. ! else
  2205. !   rm -rf conftest*
  2206. !   eval "ac_cv_lib_$ac_lib=no"
  2207.   fi
  2208.   rm -f conftest*
  2209. ! LIBS="$ac_save_LIBS"
  2210. ! fi
  2211. ! if eval "test \"`echo '$ac_cv_lib_'$ac_lib`\" = yes"; then
  2212. !   echo "$ac_t""yes" 1>&4
  2213. !   LEXLIB="-l$ac_lib"
  2214.   else
  2215. !   echo "$ac_t""no" 1>&4
  2216.   fi
  2217.   fi
  2218.   
  2219. ! echo $ac_n "checking whether ln -s works""... $ac_c" 1>&4
  2220. ! if eval "test \"`echo '${'ac_cv_prog_LN_S'+set}'`\" = set"; then
  2221. !   echo $ac_n "(cached) $ac_c" 1>&4
  2222. ! else
  2223. !   rm -f conftestdata
  2224.   if ln -s X conftestdata 2>/dev/null
  2225.   then
  2226.     rm -f conftestdata
  2227. !   ac_cv_prog_LN_S="ln -s"
  2228.   else
  2229. !   ac_cv_prog_LN_S=ln
  2230. ! fi
  2231. ! fi
  2232. ! LN_S="$ac_cv_prog_LN_S"
  2233. ! if test "$ac_cv_prog_LN_S" = "ln -s"; then
  2234. !   echo "$ac_t""yes" 1>&4
  2235. ! else
  2236. !   echo "$ac_t""no" 1>&4
  2237.   fi
  2238.   
  2239.   
  2240. ! echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&4
  2241. ! if eval "test \"`echo '${'ac_cv_type_signal'+set}'`\" = set"; then
  2242. !   echo $ac_n "(cached) $ac_c" 1>&4
  2243. ! else
  2244. !   cat > conftest.$ac_ext <<EOF
  2245. ! #line 1350 "configure"
  2246.   #include "confdefs.h"
  2247.   #include <sys/types.h>
  2248. ***************
  2249. *** 717,815 ****
  2250.   #endif
  2251.   extern void (*signal ()) ();
  2252. ! int main() { exit(0); }
  2253. ! int t() { int i; }
  2254.   EOF
  2255. ! if eval $compile; then
  2256.     rm -rf conftest*
  2257. !   
  2258. ! {
  2259. ! test -n "$verbose" && \
  2260. ! echo "    defining" RETSIGTYPE to be void
  2261. ! echo "#define" RETSIGTYPE void >> confdefs.h
  2262. ! DEFS="$DEFS -DRETSIGTYPE=void"
  2263. ! SEDDEFS="${SEDDEFS}\${SEDdA}RETSIGTYPE\${SEDdB}RETSIGTYPE\${SEDdC}void\${SEDdD}
  2264. ! \${SEDuA}RETSIGTYPE\${SEDuB}RETSIGTYPE\${SEDuC}void\${SEDuD}
  2265. ! \${SEDeA}RETSIGTYPE\${SEDeB}RETSIGTYPE\${SEDeC}void\${SEDeD}
  2266. ! "
  2267. ! }
  2268.   else
  2269.     rm -rf conftest*
  2270. !   
  2271. ! {
  2272. ! test -n "$verbose" && \
  2273. ! echo "    defining" RETSIGTYPE to be int
  2274. ! echo "#define" RETSIGTYPE int >> confdefs.h
  2275. ! DEFS="$DEFS -DRETSIGTYPE=int"
  2276. ! SEDDEFS="${SEDDEFS}\${SEDdA}RETSIGTYPE\${SEDdB}RETSIGTYPE\${SEDdC}int\${SEDdD}
  2277. ! \${SEDuA}RETSIGTYPE\${SEDuB}RETSIGTYPE\${SEDuC}int\${SEDuD}
  2278. ! \${SEDeA}RETSIGTYPE\${SEDeB}RETSIGTYPE\${SEDeC}int\${SEDeD}
  2279. ! "
  2280. ! }
  2281.   fi
  2282.   rm -f conftest*
  2283.   
  2284. ! echo checking for unsigned characters
  2285. ! cat > conftest.c <<EOF
  2286.   #include "confdefs.h"
  2287.   /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
  2288. ! #if !__STDC__
  2289.   #define volatile
  2290.   #endif
  2291.   main() {
  2292. - #ifdef __CHAR_UNSIGNED__
  2293. -   exit(1); /* No need to redefine it.  */
  2294. - #else
  2295.     volatile char c = 255; exit(c < 0);
  2296. - #endif
  2297.   }
  2298.   EOF
  2299. ! eval $compile
  2300.   if test -s conftest && (./conftest; exit) 2>/dev/null; then
  2301. !   
  2302. ! {
  2303. ! test -n "$verbose" && \
  2304. ! echo "    defining __CHAR_UNSIGNED__"
  2305. ! echo "#define" __CHAR_UNSIGNED__ 1 >> confdefs.h
  2306. ! DEFS="$DEFS -D__CHAR_UNSIGNED__=1"
  2307. ! SEDDEFS="${SEDDEFS}\${SEDdA}__CHAR_UNSIGNED__\${SEDdB}__CHAR_UNSIGNED__\${SEDdC}1\${SEDdD}
  2308. ! \${SEDuA}__CHAR_UNSIGNED__\${SEDuB}__CHAR_UNSIGNED__\${SEDuC}1\${SEDuD}
  2309. ! \${SEDeA}__CHAR_UNSIGNED__\${SEDeB}__CHAR_UNSIGNED__\${SEDeC}1\${SEDeD}
  2310. ! "
  2311. ! }
  2312.   fi
  2313.   rm -fr conftest*
  2314.   
  2315. ! echo checking for 64-bit long ints
  2316. ! cat > conftest.c <<EOF
  2317.   #include "confdefs.h"
  2318.   main() { exit(sizeof(long int) != 8); }
  2319.   EOF
  2320. ! eval $compile
  2321.   if test -s conftest && (./conftest; exit) 2>/dev/null; then
  2322. !   
  2323. ! {
  2324. ! test -n "$verbose" && \
  2325. ! echo "    defining LONG_64_BITS"
  2326. ! echo "#define" LONG_64_BITS 1 >> confdefs.h
  2327. ! DEFS="$DEFS -DLONG_64_BITS=1"
  2328. ! SEDDEFS="${SEDDEFS}\${SEDdA}LONG_64_BITS\${SEDdB}LONG_64_BITS\${SEDdC}1\${SEDdD}
  2329. ! \${SEDuA}LONG_64_BITS\${SEDuB}LONG_64_BITS\${SEDuC}1\${SEDuD}
  2330. ! \${SEDeA}LONG_64_BITS\${SEDeB}LONG_64_BITS\${SEDeC}1\${SEDeD}
  2331. ! "
  2332. ! }
  2333.   
  2334.   fi
  2335.   rm -fr conftest*
  2336.   
  2337. ! echo checking byte ordering
  2338. ! cat > conftest.c <<EOF
  2339.   #include "confdefs.h"
  2340.   main () {
  2341. --- 1355,1468 ----
  2342.   #endif
  2343.   extern void (*signal ()) ();
  2344. ! int main() { return 0; }
  2345. ! int t() {
  2346. ! int i;
  2347. ! ; return 0; }
  2348. ! EOF
  2349. ! if eval $ac_compile; then
  2350. !   rm -rf conftest*
  2351. !   ac_cv_type_signal=void
  2352. ! else
  2353. !   rm -rf conftest*
  2354. !   ac_cv_type_signal=int
  2355. ! fi
  2356. ! rm -f conftest*
  2357. ! fi
  2358. ! echo "$ac_t""$ac_cv_type_signal" 1>&4
  2359. ! cat >> confdefs.h <<EOF
  2360. ! #define RETSIGTYPE $ac_cv_type_signal
  2361. ! EOF
  2362. ! echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&4
  2363. ! if eval "test \"`echo '${'ac_cv_c_char_unsigned'+set}'`\" = set"; then
  2364. !   echo $ac_n "(cached) $ac_c" 1>&4
  2365. ! else
  2366. !   if test "$GCC" = yes; then
  2367. !   # GCC predefines this symbol on systems where it applies.
  2368. ! cat > conftest.$ac_ext <<EOF
  2369. ! #line 1387 "configure"
  2370. ! #include "confdefs.h"
  2371. ! #ifdef __CHAR_UNSIGNED__
  2372. !   yes
  2373. ! #endif
  2374.   EOF
  2375. ! if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2376. !   egrep "yes" >/dev/null 2>&1; then
  2377.     rm -rf conftest*
  2378. !   ac_cv_c_char_unsigned=yes
  2379.   else
  2380.     rm -rf conftest*
  2381. !   ac_cv_c_char_unsigned=no
  2382.   fi
  2383.   rm -f conftest*
  2384.   
  2385. ! else
  2386. ! if test "$cross_compiling" = yes; then
  2387. !     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  2388. ! else
  2389. ! cat > conftest.$ac_ext <<EOF
  2390. ! #line 1409 "configure"
  2391.   #include "confdefs.h"
  2392.   /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
  2393. ! #if !defined(__STDC__) || __STDC__ != 1
  2394.   #define volatile
  2395.   #endif
  2396.   main() {
  2397.     volatile char c = 255; exit(c < 0);
  2398.   }
  2399.   EOF
  2400. ! eval $ac_link
  2401.   if test -s conftest && (./conftest; exit) 2>/dev/null; then
  2402. !   ac_cv_c_char_unsigned=yes
  2403. ! else
  2404. !   ac_cv_c_char_unsigned=no
  2405. ! fi
  2406.   fi
  2407.   rm -fr conftest*
  2408. + fi
  2409. + fi
  2410. + echo "$ac_t""$ac_cv_c_char_unsigned" 1>&4
  2411. + if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
  2412. +   cat >> confdefs.h <<\EOF
  2413. + #define __CHAR_UNSIGNED__ 1
  2414. + EOF
  2415.   
  2416. ! fi
  2417. ! echo $ac_n "checking whether long int is 64 bits""... $ac_c" 1>&4
  2418. ! if test "$cross_compiling" = yes; then
  2419. !     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  2420. ! else
  2421. ! cat > conftest.$ac_ext <<EOF
  2422. ! #line 1442 "configure"
  2423.   #include "confdefs.h"
  2424.   main() { exit(sizeof(long int) != 8); }
  2425.   EOF
  2426. ! eval $ac_link
  2427.   if test -s conftest && (./conftest; exit) 2>/dev/null; then
  2428. !   echo "$ac_t""yes" 1>&4
  2429. !  cat >> confdefs.h <<\EOF
  2430. ! #define LONG_64_BITS 1
  2431. ! EOF
  2432.   
  2433. + else
  2434. +   echo "$ac_t""no" 1>&4
  2435. + fi
  2436.   fi
  2437.   rm -fr conftest*
  2438.   
  2439. ! echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&4
  2440. ! if eval "test \"`echo '${'ac_cv_c_bigendian'+set}'`\" = set"; then
  2441. !   echo $ac_n "(cached) $ac_c" 1>&4
  2442. ! else
  2443. !   if test "$cross_compiling" = yes; then
  2444. !     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  2445. ! else
  2446. ! cat > conftest.$ac_ext <<EOF
  2447. ! #line 1467 "configure"
  2448.   #include "confdefs.h"
  2449.   main () {
  2450. ***************
  2451. *** 824,974 ****
  2452.   }
  2453.   EOF
  2454. ! eval $compile
  2455.   if test -s conftest && (./conftest; exit) 2>/dev/null; then
  2456. !   :
  2457.   else
  2458. !   
  2459. ! {
  2460. ! test -n "$verbose" && \
  2461. ! echo "    defining WORDS_BIGENDIAN"
  2462. ! echo "#define" WORDS_BIGENDIAN 1 >> confdefs.h
  2463. ! DEFS="$DEFS -DWORDS_BIGENDIAN=1"
  2464. ! SEDDEFS="${SEDDEFS}\${SEDdA}WORDS_BIGENDIAN\${SEDdB}WORDS_BIGENDIAN\${SEDdC}1\${SEDdD}
  2465. ! \${SEDuA}WORDS_BIGENDIAN\${SEDuB}WORDS_BIGENDIAN\${SEDuC}1\${SEDuD}
  2466. ! \${SEDeA}WORDS_BIGENDIAN\${SEDeB}WORDS_BIGENDIAN\${SEDeC}1\${SEDeD}
  2467. ! "
  2468. ! }
  2469.   fi
  2470.   rm -fr conftest*
  2471.   
  2472.   
  2473. ! echo checking how to declare yytext
  2474. ! # Figure out what yytext is by creating a minimal parser and
  2475. ! # examining the (preprocessed, in case macros are used) output.
  2476. ! if test "z${DECLARE_YYTEXT}" = "z"; then
  2477. !   echo '%%
  2478. ! %%' | ${LEX}
  2479. !   if test -f lex.yy.c; then
  2480. !     LEX_OUTPUT_ROOT=lex.yy
  2481. !   elif test -f lexyy.c; then
  2482. !     LEX_OUTPUT_ROOT=lexyy
  2483. !   else
  2484. !     # Don't know what to do here.
  2485. !     echo "Can't find output from $LEX; assuming lex.yy.c." 1>&2
  2486. !     LEX_OUTPUT_ROOT=lex.yy
  2487. !   fi
  2488. !   DECLARE_YYTEXT=`eval ${CPP} "${LEX_OUTPUT_ROOT}.c" |
  2489. !     sed -n '/extern.*yytext[^a-zA-Z0-9_]/s/^.*extern/extern/p'`
  2490. !   rm -f "${LEX_OUTPUT_ROOT}.c"
  2491.   fi
  2492.   
  2493. - {
  2494. - test -n "$verbose" && \
  2495. - echo "    defining" DECLARE_YYTEXT to be $DECLARE_YYTEXT
  2496. - echo "#define" DECLARE_YYTEXT $DECLARE_YYTEXT >> confdefs.h
  2497. - DEFS="$DEFS -DDECLARE_YYTEXT=$DECLARE_YYTEXT"
  2498. - SEDDEFS="${SEDDEFS}\${SEDdA}DECLARE_YYTEXT\${SEDdB}DECLARE_YYTEXT\${SEDdC}$DECLARE_YYTEXT\${SEDdD}
  2499. - \${SEDuA}DECLARE_YYTEXT\${SEDuB}DECLARE_YYTEXT\${SEDuC}$DECLARE_YYTEXT\${SEDuD}
  2500. - \${SEDeA}DECLARE_YYTEXT\${SEDeB}DECLARE_YYTEXT\${SEDeC}$DECLARE_YYTEXT\${SEDeD}
  2501. - "
  2502. - }
  2503.   
  2504.   
  2505. ! echo checking for window system libraries
  2506. ! cat > conftest.c <<EOF
  2507.   #include "confdefs.h"
  2508.   #include "$srcdir/lib/c-auto.h.in"
  2509. ! #ifndef SUNWIN
  2510. ! #include <nonexistxyz.kkk>
  2511.   #endif
  2512.   
  2513.   EOF
  2514. ! err=`eval "($CPP conftest.c >/dev/null) 2>&1"`
  2515. ! if test -z "$err"; then
  2516.     rm -rf conftest*
  2517. !   SUNWIN=t
  2518.   fi
  2519.   rm -f conftest*
  2520. ! cat > conftest.c <<EOF
  2521.   #include "confdefs.h"
  2522.   #include "$srcdir/lib/c-auto.h.in"
  2523. ! #ifndef XVIEWWIN
  2524. ! #include <nonexistxyz.kkk>
  2525.   #endif
  2526.   
  2527.   EOF
  2528. ! err=`eval "($CPP conftest.c >/dev/null) 2>&1"`
  2529. ! if test -z "$err"; then
  2530.     rm -rf conftest*
  2531. !   XVIEWWIN=t
  2532.   fi
  2533.   rm -f conftest*
  2534. ! cat > conftest.c <<EOF
  2535.   #include "confdefs.h"
  2536.   #include "$srcdir/lib/c-auto.h.in"
  2537. ! #ifndef X11WIN
  2538. ! #include <nonexistxyz.kkk>
  2539.   #endif
  2540.   
  2541.   EOF
  2542. ! err=`eval "($CPP conftest.c >/dev/null) 2>&1"`
  2543. ! if test -z "$err"; then
  2544.     rm -rf conftest*
  2545. !   X11WIN=t
  2546.   fi
  2547.   rm -f conftest*
  2548. ! cat > conftest.c <<EOF
  2549.   #include "confdefs.h"
  2550.   #include "$srcdir/lib/c-auto.h.in"
  2551. ! #ifndef X10WIN
  2552. ! #include <nonexistxyz.kkk>
  2553.   #endif
  2554.   
  2555.   EOF
  2556. ! err=`eval "($CPP conftest.c >/dev/null) 2>&1"`
  2557. ! if test -z "$err"; then
  2558.     rm -rf conftest*
  2559. !   X10WIN=t
  2560.   fi
  2561.   rm -f conftest*
  2562. ! if test -n "$XVIEWWIN"; then
  2563.     wlibs="-lxview -lolgx -lX11 $wlibs"
  2564.     (cd $srcdir/mf/MFwindow; rm -f sun.c; $LN_S sun-xview.c sun.c)
  2565.   fi
  2566. ! if test -n "$X11WIN"; then
  2567. !   # If we find X, set shell vars x_includes and x_libraries to the paths.
  2568. ! no_x=true
  2569. ! echo checking for X include and library files with xmkmf
  2570.   rm -fr conftestdir
  2571.   if mkdir conftestdir; then
  2572.     cd conftestdir
  2573. !   cat > Imakefile <<\EOF
  2574.   acfindx:
  2575. !     @echo "im_incroot=$(INCROOT); im_usrlibdir=$(USRLIBDIR); im_libdir=$(LIBDIR)"
  2576.   EOF
  2577.     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
  2578.       no_x=
  2579.       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  2580. !     eval `make acfindx | grep -v make`
  2581.       # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
  2582. !     if test ! -f $im_usrlibdir/libX11.a && test -f $im_libdir/libX11.a; then
  2583. !       im_usrlibdir=$im_libdir
  2584.       fi
  2585. !     case "$im_incroot" in
  2586.       /usr/include) ;;
  2587. !     *) x_includes="$im_incroot" ;;
  2588.       esac
  2589. !     case "$im_usrlibdir" in
  2590.       /usr/lib | /lib) ;;
  2591. !     *) x_libraries="$im_usrlibdir" ;;
  2592.       esac
  2593.     fi
  2594. --- 1477,1694 ----
  2595.   }
  2596.   EOF
  2597. ! eval $ac_link
  2598.   if test -s conftest && (./conftest; exit) 2>/dev/null; then
  2599. !   ac_cv_c_bigendian=no
  2600.   else
  2601. !   ac_cv_c_bigendian=yes
  2602. ! fi
  2603.   fi
  2604.   rm -fr conftest*
  2605. + fi
  2606. + echo "$ac_t""$ac_cv_c_bigendian" 1>&4
  2607. + if test $ac_cv_c_bigendian = yes; then
  2608. +   cat >> confdefs.h <<\EOF
  2609. + #define WORDS_BIGENDIAN 1
  2610. + EOF
  2611.   
  2612. + fi
  2613.   
  2614. ! if eval "test \"`echo '${'ac_cv_prog_lex_output_root'+set}'`\" = set"; then
  2615. !   echo $ac_n "(cached) $ac_c" 1>&4
  2616. ! else
  2617. !   # The minimal lex program is just a single line: %%.  But some broken lexes
  2618. ! # (Solaris, I think it was) want two %% lines, so accommodate them.
  2619. ! echo '%%
  2620. ! %%' | $LEX
  2621. ! if test -f lex.yy.c; then
  2622. !   ac_cv_prog_lex_output_root=lex.yy
  2623. ! elif test -f lexyy.c; then
  2624. !   ac_cv_prog_lex_output_root=lexyy
  2625. ! else
  2626. !   { echo "configure: error: cannot find output from $LEX, giving up" 1>&2; exit 1; }
  2627.   fi
  2628. + fi
  2629. + LEX_OUTPUT_ROOT=$ac_cv_prog_lex_output_root
  2630. + echo $ac_n "checking for yytext declaration""... $ac_c" 1>&4
  2631. + if eval "test \"`echo '${'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then
  2632. +   echo $ac_n "(cached) $ac_c" 1>&4
  2633. + else
  2634. +   # POSIX says lex can declare yytext either as a pointer or an array; the
  2635. + # default is implementation-dependent. Figure out which it is, since
  2636. + # not all implementations provide the %pointer and %array declarations.
  2637. + ac_cv_prog_lex_yytext_pointer=no
  2638. + echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
  2639. + ac_save_LIBS="$LIBS"
  2640. + LIBS="$LIBS $LEXLIB"
  2641. + cat > conftest.$ac_ext <<EOF
  2642. + #line 1526 "configure"
  2643. + #include "confdefs.h"
  2644. + `cat $LEX_OUTPUT_ROOT.c`
  2645. + int main() { return 0; }
  2646. + int t() {
  2647. + ; return 0; }
  2648. + EOF
  2649. + if eval $ac_link; then
  2650. +   rm -rf conftest*
  2651. +   ac_cv_prog_lex_yytext_pointer=yes
  2652. + fi
  2653. + rm -f conftest*
  2654. + LIBS="$ac_save_LIBS"
  2655. + rm -f "${LEX_OUTPUT_ROOT}.c"
  2656. + fi
  2657. + echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&4
  2658. + if test $ac_cv_prog_lex_yytext_pointer = yes; then
  2659. +   cat >> confdefs.h <<\EOF
  2660. + #define YYTEXT_POINTER 1
  2661. + EOF
  2662. + fi
  2663.   
  2664.   
  2665.   
  2666. ! echo $ac_n "checking for sunwindow libraries""... $ac_c" 1>&4
  2667. ! cat > conftest.$ac_ext <<EOF
  2668. ! #line 1556 "configure"
  2669.   #include "confdefs.h"
  2670.   #include "$srcdir/lib/c-auto.h.in"
  2671. ! #ifdef SUNWIN
  2672. !   yes
  2673.   #endif
  2674.   
  2675.   EOF
  2676. ! if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2677. !   egrep "yes" >/dev/null 2>&1; then
  2678.     rm -rf conftest*
  2679. !   SUNWIN=yes
  2680. ! else
  2681. !   rm -rf conftest*
  2682. !   SUNWIN=no
  2683.   fi
  2684.   rm -f conftest*
  2685. ! echo "$ac_t""$SUNWIN" 1>&4
  2686. ! echo $ac_n "checking for xview libraries""... $ac_c" 1>&4
  2687. ! cat > conftest.$ac_ext <<EOF
  2688. ! #line 1578 "configure"
  2689.   #include "confdefs.h"
  2690.   #include "$srcdir/lib/c-auto.h.in"
  2691. ! #ifdef XVIEWWIN
  2692. !   yes
  2693.   #endif
  2694.   
  2695.   EOF
  2696. ! if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2697. !   egrep "yes" >/dev/null 2>&1; then
  2698.     rm -rf conftest*
  2699. !   XVIEWWIN=yes
  2700. ! else
  2701. !   rm -rf conftest*
  2702. !   XVIEWWIN=no
  2703.   fi
  2704.   rm -f conftest*
  2705. ! echo "$ac_t""$XVIEWWIN" 1>&4
  2706. ! echo $ac_n "checking for X11 libraries""... $ac_c" 1>&4
  2707. ! cat > conftest.$ac_ext <<EOF
  2708. ! #line 1600 "configure"
  2709.   #include "confdefs.h"
  2710.   #include "$srcdir/lib/c-auto.h.in"
  2711. ! #ifdef X11WIN
  2712. !   yes
  2713.   #endif
  2714.   
  2715.   EOF
  2716. ! if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2717. !   egrep "yes" >/dev/null 2>&1; then
  2718.     rm -rf conftest*
  2719. !   X11WIN=yes
  2720. ! else
  2721. !   rm -rf conftest*
  2722. !   X11WIN=no
  2723.   fi
  2724.   rm -f conftest*
  2725. ! echo "$ac_t""$X11WIN" 1>&4
  2726. ! echo $ac_n "checking for X10 libraries""... $ac_c" 1>&4
  2727. ! cat > conftest.$ac_ext <<EOF
  2728. ! #line 1622 "configure"
  2729.   #include "confdefs.h"
  2730.   #include "$srcdir/lib/c-auto.h.in"
  2731. ! #ifdef X10WIN
  2732. !   yes
  2733.   #endif
  2734.   
  2735.   EOF
  2736. ! if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2737. !   egrep "yes" >/dev/null 2>&1; then
  2738.     rm -rf conftest*
  2739. !   X10WIN=yes
  2740. ! else
  2741. !   rm -rf conftest*
  2742. !   X10WIN=no
  2743.   fi
  2744.   rm -f conftest*
  2745. ! echo "$ac_t""$X10WIN" 1>&4
  2746. ! if test $XVIEWWIN = yes; then
  2747.     wlibs="-lxview -lolgx -lX11 $wlibs"
  2748.     (cd $srcdir/mf/MFwindow; rm -f sun.c; $LN_S sun-xview.c sun.c)
  2749.   fi
  2750. ! if test $X11WIN = yes; then
  2751. !   # If we find X, set shell vars x_includes and x_libraries to the
  2752. ! # paths, otherwise set no_x=yes.
  2753. ! # Uses ac_ vars as temps to allow command line to override cache and checks.
  2754. ! # --without-x overrides everything else, but does not touch the cache.
  2755. ! echo $ac_n "checking for X""... $ac_c" 1>&4
  2756. ! # Check whether --with-x or --without-x was given.
  2757. ! withval="$with_x"
  2758. ! if test -n "$withval"; then
  2759. !   :
  2760. ! fi
  2761. ! if test "x$with_x" = xno; then
  2762. !   no_x=yes
  2763. ! else
  2764. !   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
  2765. !     no_x=
  2766. !   else
  2767. ! if eval "test \"`echo '${'ac_cv_path_x'+set}'`\" = set"; then
  2768. !   echo $ac_n "(cached) $ac_c" 1>&4
  2769. ! else
  2770. !   # One or both of the vars are not set, and there is no cached value.
  2771. ! no_x=yes
  2772.   rm -fr conftestdir
  2773.   if mkdir conftestdir; then
  2774.     cd conftestdir
  2775. !   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
  2776. !   cat > Imakefile <<'EOF'
  2777.   acfindx:
  2778. !     @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
  2779.   EOF
  2780.     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
  2781.       no_x=
  2782.       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  2783. !     eval `make acfindx 2>/dev/null | grep -v make`
  2784.       # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
  2785. !     if test ! -f $ac_im_usrlibdir/libX11.a && test -f $ac_im_libdir/libX11.a
  2786. !     then
  2787. !       ac_im_usrlibdir=$ac_im_libdir
  2788.       fi
  2789. !     case "$ac_im_incroot" in
  2790.       /usr/include) ;;
  2791. !     *) ac_x_includes="$ac_im_incroot" ;;
  2792.       esac
  2793. !     case "$ac_im_usrlibdir" in
  2794.       /usr/lib | /lib) ;;
  2795. !     *) ac_x_libraries="$ac_im_usrlibdir" ;;
  2796.       esac
  2797.     fi
  2798. ***************
  2799. *** 977,1009 ****
  2800.   fi
  2801.   
  2802. ! if test -z "$im_usrlibdir"; then
  2803. ! echo checking for X include and library files directly
  2804. ! cat > conftest.c <<EOF
  2805. ! #include "confdefs.h"
  2806. ! #include <X11/Intrinsic.h>
  2807. ! EOF
  2808. ! err=`eval "($CPP conftest.c >/dev/null) 2>&1"`
  2809. ! if test -z "$err"; then
  2810.     rm -rf conftest*
  2811. !   no_x=
  2812.   else
  2813.     rm -rf conftest*
  2814. !   for dir in \
  2815. !     /usr/local/include \
  2816. !     /usr/unsupported/include \
  2817. !     /usr/x386/include \
  2818. !     /usr/local/x11r5/include \
  2819. !     /usr/include/X11R5 \
  2820. !     /usr/include/X11R4 \
  2821. !     /usr/X11R5/include \
  2822. !     /usr/X11/include \
  2823. !     /usr/openwin/include \
  2824.       /usr/openwin/share/include \
  2825. -     /usr/lpp/Xamples/include \
  2826.       ; \
  2827.     do
  2828. !     if test -r $dir/X11/Intrinsic.h; then
  2829. !       x_includes=$dir; no_x=
  2830.         break
  2831.       fi
  2832. --- 1697,1756 ----
  2833.   fi
  2834.   
  2835. ! if test "$no_x" = yes; then
  2836. ! test -z "$x_direct_test_library" && x_direct_test_library=Xt
  2837. ! test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
  2838. ! test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
  2839. ! cat > conftest.$ac_ext <<EOF
  2840. ! #line 1705 "configure"
  2841. ! #include "confdefs.h"
  2842. ! #include <$x_direct_test_include>
  2843. ! EOF
  2844. ! eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2845. ! ac_err=`grep -v '^ *+' conftest.out`
  2846. ! if test -z "$ac_err"; then
  2847.     rm -rf conftest*
  2848. !   no_x= ac_x_includes=
  2849.   else
  2850. +   echo "$ac_err" >&5
  2851.     rm -rf conftest*
  2852. !     for ac_dir in               \
  2853. !     /usr/X11R6/include        \
  2854. !     /usr/X11R5/include        \
  2855. !     /usr/X11R4/include        \
  2856. !                               \
  2857. !     /usr/include/X11R6        \
  2858. !     /usr/include/X11R5        \
  2859. !     /usr/include/X11R4        \
  2860. !                               \
  2861. !     /usr/local/X11R6/include  \
  2862. !     /usr/local/X11R5/include  \
  2863. !     /usr/local/X11R4/include  \
  2864. !                               \
  2865. !     /usr/local/include/X11R6  \
  2866. !     /usr/local/include/X11R5  \
  2867. !     /usr/local/include/X11R4  \
  2868. !                               \
  2869. !     /usr/X11/include          \
  2870. !     /usr/include/X11          \
  2871. !     /usr/local/X11/include    \
  2872. !     /usr/local/include/X11    \
  2873. !                               \
  2874. !     /usr/X386/include         \
  2875. !     /usr/x386/include         \
  2876. !     /usr/XFree86/include/X11  \
  2877. !                               \
  2878. !     /usr/include              \
  2879. !     /usr/local/include        \
  2880. !     /usr/unsupported/include  \
  2881. !     /usr/athena/include       \
  2882. !     /usr/local/x11r5/include  \
  2883. !     /usr/lpp/Xamples/include  \
  2884. !                               \
  2885. !     /usr/openwin/include      \
  2886.       /usr/openwin/share/include \
  2887.       ; \
  2888.     do
  2889. !     if test -r "$ac_dir/$x_direct_test_include"; then
  2890. !       no_x= ac_x_includes=$ac_dir
  2891.         break
  2892.       fi
  2893. ***************
  2894. *** 1012,1053 ****
  2895.   rm -f conftest*
  2896.   
  2897. ! # Check for the libraries.  First see if replacing the `include' by
  2898. ! # `lib' works.
  2899. ! LIBS_save="${LIBS}"
  2900. ! LIBS="${LIBS} -lXt"
  2901. ! have_lib=""
  2902. ! echo checking for -lXt
  2903. ! cat > conftest.c <<EOF
  2904. ! #include "confdefs.h"
  2905. ! int main() { exit(0); }
  2906. ! int t() { main(); }
  2907. ! EOF
  2908. ! if eval $compile; then
  2909. !   rm -rf conftest*
  2910. !   have_lib="1"
  2911. ! fi
  2912. ! rm -f conftest*
  2913. ! LIBS="${LIBS_save}"
  2914. ! if test -n "${have_lib}"; then
  2915. !    :; no_x=
  2916. ! else
  2917. !    :; for dir in `echo "$x_includes" | sed s/include/lib/` \
  2918. !   /usr/local/lib \
  2919. !   /usr/unsupported/lib \
  2920. !   /usr/x386/lib \
  2921. !   /usr/local/x11r5/lib \
  2922. !   /usr/lib/X11 \
  2923. !   /usr/lib/X11R4 \
  2924. !   /usr/X11R5/lib \
  2925. !   /usr/X11/lib \
  2926. !   /usr/openwin/lib \
  2927. !   /usr/lpp/Xamples/lib \
  2928. !   ; \
  2929.   do
  2930. !   for extension in a so sl; do
  2931. !     if test -r $dir/libXt.$extension; then
  2932. !       x_libraries=$dir; no_x=
  2933.         break 2
  2934.       fi
  2935. --- 1759,1823 ----
  2936.   rm -f conftest*
  2937.   
  2938. ! # Check for the libraries.
  2939. ! # See if we find them without any special options.
  2940. ! # Don't add to $LIBS permanently.
  2941. ! ac_save_LIBS="$LIBS"
  2942. ! LIBS="$LIBS -l$x_direct_test_library"
  2943. ! cat > conftest.$ac_ext <<EOF
  2944. ! #line 1768 "configure"
  2945. ! #include "confdefs.h"
  2946. ! int main() { return 0; }
  2947. ! int t() {
  2948. ! ${x_direct_test_function}()
  2949. ! ; return 0; }
  2950. ! EOF
  2951. ! if eval $ac_link; then
  2952. !   rm -rf conftest*
  2953. !   LIBS="$ac_save_LIBS" no_x= ac_x_libraries=
  2954. ! else
  2955. !   rm -rf conftest*
  2956. !   LIBS="$ac_save_LIBS"
  2957. ! # First see if replacing the include by lib works.
  2958. ! for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
  2959. !     /usr/X11R6/lib        \
  2960. !     /usr/X11R5/lib        \
  2961. !     /usr/X11R4/lib        \
  2962. !                           \
  2963. !     /usr/lib/X11R6        \
  2964. !     /usr/lib/X11R5        \
  2965. !     /usr/lib/X11R4        \
  2966. !                           \
  2967. !     /usr/local/X11R6/lib  \
  2968. !     /usr/local/X11R5/lib  \
  2969. !     /usr/local/X11R4/lib  \
  2970. !                           \
  2971. !     /usr/local/lib/X11R6  \
  2972. !     /usr/local/lib/X11R5  \
  2973. !     /usr/local/lib/X11R4  \
  2974. !                           \
  2975. !     /usr/X11/lib          \
  2976. !     /usr/lib/X11          \
  2977. !     /usr/local/X11/lib    \
  2978. !     /usr/local/lib/X11    \
  2979. !                           \
  2980. !     /usr/X386/lib         \
  2981. !     /usr/x386/lib         \
  2982. !     /usr/XFree86/lib/X11  \
  2983. !                           \
  2984. !     /usr/lib              \
  2985. !     /usr/local/lib        \
  2986. !     /usr/unsupported/lib  \
  2987. !     /usr/athena/lib       \
  2988. !     /usr/local/x11r5/lib  \
  2989. !     /usr/lpp/Xamples/lib  \
  2990. !                           \
  2991. !     /usr/openwin/lib      \
  2992. !     /usr/openwin/share/lib \
  2993. !     ; \
  2994.   do
  2995. !   for ac_extension in a so sl; do
  2996. !     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
  2997. !       no_x= ac_x_libraries=$ac_dir
  2998.         break 2
  2999.       fi
  3000. ***************
  3001. *** 1055,1207 ****
  3002.   done
  3003.   fi
  3004.   
  3005.   fi
  3006. ! if test -n "$verbose"; then
  3007. !   test -n "$x_includes" && echo "    found X11 headers in $x_includes"
  3008. !   test -n "$x_libraries" && echo "    found X11 libraries in $x_libraries"
  3009. ! fi
  3010. !   
  3011. ! if test -n "$x_includes"; then
  3012. !   x_include_flags=-I$x_includes
  3013. ! elif test -n "$no_x"; then 
  3014. !   # Not all programs may use this symbol, but it won't hurt to define it.
  3015. !   x_include_flags=-DX_DISPLAY_MISSING
  3016.   fi
  3017. - #
  3018. - # It would be nice to have a more robust check for the -R ld option then
  3019. - # just checking for Solaris.
  3020. - # 
  3021. - # It would also be nice to do this for all -L options, not just this one.
  3022. - if test -n "$x_libraries"; then
  3023. -   x_lib_flags=-L$x_libraries
  3024. -   if test "`uname 2>/dev/null`" = SunOS \
  3025. -      && uname -r | grep '^5' >/dev/null; then
  3026. -     x_lib_flags="$x_lib_flags -R$x_libraries"
  3027.     fi
  3028.   fi
  3029. ! #
  3030. ! # Check for additional X libraries.
  3031. ! # 
  3032. ! # Since we already have an explicit check for POSIXified ISC, assume
  3033. ! # it's been used.
  3034. ! if test -n "$ISC"; then
  3035. !   x_extra_libs="$x_extra_libs -lnsl_s -linet"
  3036. !   test -n "$verbose" && echo "    adding -lnsl_s -linet to x_extra_libs (for ISC)"
  3037.   else
  3038. !   # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
  3039. !   # libraries were built with DECnet support.  And karl@cs.umb.edu's Alpha
  3040. !   # needs dnet_stub.
  3041. !   LIBS_save="${LIBS}"
  3042. ! LIBS="${LIBS} -ldnet"
  3043. ! have_lib=""
  3044. ! echo checking for -ldnet
  3045. ! cat > conftest.c <<EOF
  3046.   #include "confdefs.h"
  3047.   
  3048. ! int main() { exit(0); }
  3049. ! int t() { main(); }
  3050.   EOF
  3051. ! if eval $compile; then
  3052.     rm -rf conftest*
  3053. !   have_lib="1"
  3054.   fi
  3055.   rm -f conftest*
  3056. ! LIBS="${LIBS_save}"
  3057. ! if test -n "${have_lib}"; then
  3058. !    :; x_extra_libs="$x_extra_libs -ldnet"
  3059. !      have_dnet=t
  3060. !      test -n "$verbose" && echo "    adding -ldnet to x_extra_libs"
  3061.   else
  3062. !    :; 
  3063.   fi
  3064.   
  3065. !   if test -z "$have_dnet"; then
  3066. !     LIBS_save="${LIBS}"
  3067. ! LIBS="${LIBS} -ldnet_stub"
  3068. ! have_lib=""
  3069. ! echo checking for -ldnet_stub
  3070. ! cat > conftest.c <<EOF
  3071.   #include "confdefs.h"
  3072.   
  3073. ! int main() { exit(0); }
  3074. ! int t() { main(); }
  3075.   EOF
  3076. ! if eval $compile; then
  3077.     rm -rf conftest*
  3078. !   have_lib="1"
  3079.   fi
  3080.   rm -f conftest*
  3081. ! LIBS="${LIBS_save}"
  3082. ! if test -n "${have_lib}"; then
  3083. !    :; x_extra_libs="$x_extra_libs -ldnet_stub"
  3084. !        test -n "$verbose" && echo "    adding -ldnet_stub to x_extra_libs"
  3085.   else
  3086. !    :; 
  3087.   fi
  3088.   
  3089. !   fi
  3090. !   # lieder@skyler.mavd.honeywell.com says without -lsocket,
  3091. !   # socket/setsockopt and other routines are undefined under SCO ODT 2.0.
  3092. !   LIBS_save="${LIBS}"
  3093. ! LIBS="${LIBS} -lsocket"
  3094. ! have_lib=""
  3095. ! echo checking for -lsocket
  3096. ! cat > conftest.c <<EOF
  3097.   #include "confdefs.h"
  3098.   
  3099. ! int main() { exit(0); }
  3100. ! int t() { main(); }
  3101.   EOF
  3102. ! if eval $compile; then
  3103.     rm -rf conftest*
  3104. !   have_lib="1"
  3105.   fi
  3106.   rm -f conftest*
  3107. ! LIBS="${LIBS_save}"
  3108. ! if test -n "${have_lib}"; then
  3109. !    :; x_extra_libs="$x_extra_libs -lsocket"
  3110. !      test -n "$verbose" && echo "    adding -lsocket to x_extra_libs"
  3111.   else
  3112. !    :; 
  3113.   fi
  3114.   
  3115. ! fi
  3116. ! #
  3117.   
  3118. !   if test -z "$Xextlib"; then
  3119. !     LIBS_save="${LIBS}"
  3120. ! LIBS="${LIBS} -lXext"
  3121. ! have_lib=""
  3122. ! echo checking for -lXext
  3123. ! cat > conftest.c <<EOF
  3124.   #include "confdefs.h"
  3125.   
  3126. ! int main() { exit(0); }
  3127. ! int t() { main(); }
  3128.   EOF
  3129. ! if eval $compile; then
  3130.     rm -rf conftest*
  3131. !   have_lib="1"
  3132.   
  3133.   fi
  3134.   rm -f conftest*
  3135. ! LIBS="${LIBS_save}"
  3136. ! if test -n "${have_lib}"; then
  3137. !    :; Xextlib=-lXext
  3138.   else
  3139. !    :; 
  3140.   fi
  3141.   
  3142.     fi
  3143. !   wlibs="-lXt $Xextlib -lX11 $wlibs"
  3144.     (cd $srcdir/mf/MFwindow; rm -f x11.c; $LN_S x11-Xt.c x11.c)
  3145.   fi
  3146. ! if test -n "$X10WIN"; then
  3147.     wlibs="-lX $wlibs"
  3148.   fi
  3149. ! if test -n "$SUNWIN"; then
  3150.     wlibs="-lsuntool -lsunwindow -lpixrect $wlibs"
  3151.     (cd $srcdir/mf/MFwindow; rm -f sun.c; $LN_S sun-sunview.c sun.c)
  3152. --- 1825,2077 ----
  3153.   done
  3154.   fi
  3155. + rm -f conftest*
  3156.   
  3157.   fi
  3158. ! if test "$no_x" = yes; then
  3159. !   ac_cv_path_x="no_x=yes"
  3160. ! else
  3161. !   ac_cv_path_x="no_x= ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
  3162. ! fi
  3163.   fi
  3164.     fi
  3165. +   eval "$ac_cv_path_x"
  3166. + fi # $with_x != no
  3167. + if test "$no_x" = yes; then
  3168. +   echo "$ac_t""no" 1>&4
  3169. + else
  3170. +   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
  3171. +   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
  3172. +   ac_cv_path_x="no_x= ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
  3173. +   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&4
  3174.   fi
  3175. !   if test "$no_x" = yes; then 
  3176. !   # Not all programs may use this symbol, but it does not hurt to define it.
  3177. !   X_CFLAGS="$X_CFLAGS -DX_DISPLAY_MISSING"
  3178. ! else
  3179. !   if test -n "$x_includes"; then
  3180. !     X_CFLAGS="$X_CFLAGS -I$x_includes"
  3181. !   fi
  3182. !   # It would be nice to have a more robust check for the -R ld option than
  3183. !   # just checking for Solaris.
  3184. !   # It would also be nice to do this for all -L options, not just this one.
  3185. !   if test -n "$x_libraries"; then
  3186. !     X_LIBS="$X_LIBS -L$x_libraries"
  3187. !     if test "`(uname) 2>/dev/null`" = SunOS &&
  3188. !       uname -r | grep '^5' >/dev/null; then
  3189. !       X_LIBS="$X_LIBS -R$x_libraries"
  3190. !     fi
  3191. !   fi
  3192. !   # Check for libraries that X11R6 Xt/Xaw programs need.
  3193. !   ac_save_LDFLAGS="$LDFLAGS"
  3194. !   LDFLAGS="$LDFLAGS -L$x_libraries"
  3195. !   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
  3196. !   # check for ICE first), but we must link in the order -lSM -lICE or
  3197. !   # we get undefined symbols.  So assume we have SM if we have ICE.
  3198. !   # These have to be linked with before -lX11, unlike the other
  3199. !   # libraries we check for below, so use a different variable.
  3200. !   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
  3201. !   echo $ac_n "checking for -lICE""... $ac_c" 1>&4
  3202. ! if eval "test \"`echo '${'ac_cv_lib_ICE'+set}'`\" = set"; then
  3203. !   echo $ac_n "(cached) $ac_c" 1>&4
  3204.   else
  3205. !   ac_save_LIBS="$LIBS"
  3206. ! LIBS="$LIBS -lICE "
  3207. ! cat > conftest.$ac_ext <<EOF
  3208. ! #line 1886 "configure"
  3209.   #include "confdefs.h"
  3210.   
  3211. ! int main() { return 0; }
  3212. ! int t() {
  3213. ! IceConnectionNumber()
  3214. ! ; return 0; }
  3215.   EOF
  3216. ! if eval $ac_link; then
  3217.     rm -rf conftest*
  3218. !   eval "ac_cv_lib_ICE=yes"
  3219. ! else
  3220. !   rm -rf conftest*
  3221. !   eval "ac_cv_lib_ICE=no"
  3222.   fi
  3223.   rm -f conftest*
  3224. ! LIBS="$ac_save_LIBS"
  3225. ! fi
  3226. ! if eval "test \"`echo '$ac_cv_lib_'ICE`\" = yes"; then
  3227. !   echo "$ac_t""yes" 1>&4
  3228. !   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
  3229.   else
  3230. !   echo "$ac_t""no" 1>&4
  3231.   fi
  3232.   
  3233. !   LDFLAGS="$ac_save_LDFLAGS"
  3234. !   # Check for system-dependent libraries X programs must link with.
  3235. !   if test "$ISC" = yes; then
  3236. !     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
  3237. !   else
  3238. !     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
  3239. !     # libraries were built with DECnet support.  And karl@cs.umb.edu says
  3240. !     # the Alpha needs dnet_stub (dnet does not exist).
  3241. !     echo $ac_n "checking for -ldnet""... $ac_c" 1>&4
  3242. ! if eval "test \"`echo '${'ac_cv_lib_dnet'+set}'`\" = set"; then
  3243. !   echo $ac_n "(cached) $ac_c" 1>&4
  3244. ! else
  3245. !   ac_save_LIBS="$LIBS"
  3246. ! LIBS="$LIBS -ldnet "
  3247. ! cat > conftest.$ac_ext <<EOF
  3248. ! #line 1929 "configure"
  3249.   #include "confdefs.h"
  3250.   
  3251. ! int main() { return 0; }
  3252. ! int t() {
  3253. ! dnet_ntoa()
  3254. ! ; return 0; }
  3255.   EOF
  3256. ! if eval $ac_link; then
  3257.     rm -rf conftest*
  3258. !   eval "ac_cv_lib_dnet=yes"
  3259. ! else
  3260. !   rm -rf conftest*
  3261. !   eval "ac_cv_lib_dnet=no"
  3262.   fi
  3263.   rm -f conftest*
  3264. ! LIBS="$ac_save_LIBS"
  3265. ! fi
  3266. ! if eval "test \"`echo '$ac_cv_lib_'dnet`\" = yes"; then
  3267. !   echo "$ac_t""yes" 1>&4
  3268. !   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
  3269.   else
  3270. !   echo "$ac_t""no" 1>&4
  3271.   fi
  3272.   
  3273. !     if test $ac_cv_lib_dnet = no; then
  3274. !       echo $ac_n "checking for -ldnet_stub""... $ac_c" 1>&4
  3275. ! if eval "test \"`echo '${'ac_cv_lib_dnet_stub'+set}'`\" = set"; then
  3276. !   echo $ac_n "(cached) $ac_c" 1>&4
  3277. ! else
  3278. !   ac_save_LIBS="$LIBS"
  3279. ! LIBS="$LIBS -ldnet_stub "
  3280. ! cat > conftest.$ac_ext <<EOF
  3281. ! #line 1963 "configure"
  3282.   #include "confdefs.h"
  3283.   
  3284. ! int main() { return 0; }
  3285. ! int t() {
  3286. ! dnet_ntoa()
  3287. ! ; return 0; }
  3288.   EOF
  3289. ! if eval $ac_link; then
  3290.     rm -rf conftest*
  3291. !   eval "ac_cv_lib_dnet_stub=yes"
  3292. ! else
  3293. !   rm -rf conftest*
  3294. !   eval "ac_cv_lib_dnet_stub=no"
  3295.   fi
  3296.   rm -f conftest*
  3297. ! LIBS="$ac_save_LIBS"
  3298. ! fi
  3299. ! if eval "test \"`echo '$ac_cv_lib_'dnet_stub`\" = yes"; then
  3300. !   echo "$ac_t""yes" 1>&4
  3301. !   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
  3302.   else
  3303. !   echo "$ac_t""no" 1>&4
  3304.   fi
  3305.   
  3306. !     fi
  3307.   
  3308. !     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
  3309. !     # to get the SysV transport functions.
  3310. !     # Not sure which flavor of 386 UNIX this is, but it seems harmless to
  3311. !     # check for it.
  3312. !     echo $ac_n "checking for -lnsl""... $ac_c" 1>&4
  3313. ! if eval "test \"`echo '${'ac_cv_lib_nsl'+set}'`\" = set"; then
  3314. !   echo $ac_n "(cached) $ac_c" 1>&4
  3315. ! else
  3316. !   ac_save_LIBS="$LIBS"
  3317. ! LIBS="$LIBS -lnsl "
  3318. ! cat > conftest.$ac_ext <<EOF
  3319. ! #line 2002 "configure"
  3320.   #include "confdefs.h"
  3321.   
  3322. ! int main() { return 0; }
  3323. ! int t() {
  3324. ! t_accept()
  3325. ! ; return 0; }
  3326.   EOF
  3327. ! if eval $ac_link; then
  3328. !   rm -rf conftest*
  3329. !   eval "ac_cv_lib_nsl=yes"
  3330. ! else
  3331.     rm -rf conftest*
  3332. !   eval "ac_cv_lib_nsl=no"
  3333. ! fi
  3334. ! rm -f conftest*
  3335. ! LIBS="$ac_save_LIBS"
  3336. ! fi
  3337. ! if eval "test \"`echo '$ac_cv_lib_'nsl`\" = yes"; then
  3338. !   echo "$ac_t""yes" 1>&4
  3339. !   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
  3340. ! else
  3341. !   echo "$ac_t""no" 1>&4
  3342. ! fi
  3343. !     # lieder@skyler.mavd.honeywell.com says without -lsocket,
  3344. !     # socket/setsockopt and other routines are undefined under SCO ODT 2.0.
  3345. !     # But -lsocket is broken on IRIX, according to simon@lia.di.epfl.ch.
  3346. !     if test "`(uname) 2>/dev/null`" != IRIX; then
  3347. !       echo $ac_n "checking for -lsocket""... $ac_c" 1>&4
  3348. ! if eval "test \"`echo '${'ac_cv_lib_socket'+set}'`\" = set"; then
  3349. !   echo $ac_n "(cached) $ac_c" 1>&4
  3350. ! else
  3351. !   ac_save_LIBS="$LIBS"
  3352. ! LIBS="$LIBS -lsocket "
  3353. ! cat > conftest.$ac_ext <<EOF
  3354. ! #line 2040 "configure"
  3355. ! #include "confdefs.h"
  3356.   
  3357. + int main() { return 0; }
  3358. + int t() {
  3359. + socket()
  3360. + ; return 0; }
  3361. + EOF
  3362. + if eval $ac_link; then
  3363. +   rm -rf conftest*
  3364. +   eval "ac_cv_lib_socket=yes"
  3365. + else
  3366. +   rm -rf conftest*
  3367. +   eval "ac_cv_lib_socket=no"
  3368.   fi
  3369.   rm -f conftest*
  3370. ! LIBS="$ac_save_LIBS"
  3371. ! fi
  3372. ! if eval "test \"`echo '$ac_cv_lib_'socket`\" = yes"; then
  3373. !   echo "$ac_t""yes" 1>&4
  3374. !   X_EXTRA_LIBS="$X_EXTRA_LIBS -lsocket"
  3375.   else
  3376. !   echo "$ac_t""no" 1>&4
  3377.   fi
  3378.   
  3379. +     fi
  3380.     fi
  3381. ! fi
  3382. !   wlibs="-lXt $X_PRE_LIBS -lX11 $wlibs"
  3383.     (cd $srcdir/mf/MFwindow; rm -f x11.c; $LN_S x11-Xt.c x11.c)
  3384.   fi
  3385. ! if test $X10WIN = yes; then
  3386.     wlibs="-lX $wlibs"
  3387.   fi
  3388. ! if test $SUNWIN = yes; then
  3389.     wlibs="-lsuntool -lsunwindow -lpixrect $wlibs"
  3390.     (cd $srcdir/mf/MFwindow; rm -f sun.c; $LN_S sun-sunview.c sun.c)
  3391. ***************
  3392. *** 1209,1316 ****
  3393.   
  3394.   
  3395. ! echo checking for small TeX/MF/BibTeX
  3396. ! # Do TeX first.
  3397. ! # If `small' version is not wanted, do nothing -- make will copy the
  3398. ! # default change file.
  3399. ! cat > conftest.c <<EOF
  3400.   #include "confdefs.h"
  3401.   #include "$srcdir/lib/c-auto.h.in"
  3402. ! #ifndef SMALLTeX
  3403. ! #include <nonexistxyz.kkk>
  3404.   #endif
  3405.   
  3406.   EOF
  3407. ! err=`eval "($CPP conftest.c >/dev/null) 2>&1"`
  3408. ! if test -z "$err"; then
  3409.     rm -rf conftest*
  3410. !   SMALLTeX=t
  3411.   fi
  3412.   rm -f conftest*
  3413. ! if test -n "$SMALLTeX"; then
  3414. !   echo "(small TeX, creating tex/ctex.ch)"
  3415.     (cd $srcdir/tex && rm -f ctex.ch && sed -f small.sed <tex.ch >ctex.ch)
  3416. !   
  3417. ! {
  3418. ! test -n "$verbose" && \
  3419. ! echo "    defining" GLUERATIO_TYPE to be float
  3420. ! echo "#define" GLUERATIO_TYPE float >> confdefs.h
  3421. ! DEFS="$DEFS -DGLUERATIO_TYPE=float"
  3422. ! SEDDEFS="${SEDDEFS}\${SEDdA}GLUERATIO_TYPE\${SEDdB}GLUERATIO_TYPE\${SEDdC}float\${SEDdD}
  3423. ! \${SEDuA}GLUERATIO_TYPE\${SEDuB}GLUERATIO_TYPE\${SEDuC}float\${SEDuD}
  3424. ! \${SEDeA}GLUERATIO_TYPE\${SEDeB}GLUERATIO_TYPE\${SEDeC}float\${SEDeD}
  3425. ! "
  3426. ! }
  3427.   
  3428.   fi
  3429.   
  3430. ! # Metafont next.
  3431. ! cat > conftest.c <<EOF
  3432.   #include "confdefs.h"
  3433.   #include "$srcdir/lib/c-auto.h.in"
  3434. ! #ifndef SMALLMF
  3435. ! #include <nonexistxyz.kkk>
  3436.   #endif
  3437.   
  3438.   EOF
  3439. ! err=`eval "($CPP conftest.c >/dev/null) 2>&1"`
  3440. ! if test -z "$err"; then
  3441.     rm -rf conftest*
  3442. !   SMALLMF=t
  3443.   fi
  3444.   rm -f conftest*
  3445. ! if test -n "$SMALLMF"; then
  3446. !   echo "(small Metafont, creating mf/cmf.ch)"
  3447.     (cd $srcdir/mf && rm -f cmf.ch && sed -f small.sed <mf.ch >cmf.ch)
  3448.   fi
  3449.   
  3450. ! # And finally BibTeX.
  3451. ! cat > conftest.c <<EOF
  3452.   #include "confdefs.h"
  3453.   #include "$srcdir/lib/c-auto.h.in"
  3454. ! #ifndef SMALLBibTeX
  3455. ! #include <nonexistxyz.kkk>
  3456.   #endif
  3457.   
  3458.   EOF
  3459. ! err=`eval "($CPP conftest.c >/dev/null) 2>&1"`
  3460. ! if test -z "$err"; then
  3461.     rm -rf conftest*
  3462. !   SMALLBibTeX=t
  3463.   fi
  3464.   rm -f conftest*
  3465. ! if test -n "$SMALLBibTeX"; then
  3466. !   echo "(small BibTeX, creating bibtex/cbibtex.ch)"
  3467.     (cd $srcdir/bibtex \
  3468.      && rm -f cbibtex.ch && sed -f small.sed <bibtex.ch >cbibtex.ch)
  3469.   fi
  3470.   
  3471. ! # Set default prefixes.
  3472. ! if test -n "$prefix"; then
  3473. !   test -z "$exec_prefix" && exec_prefix='${prefix}'
  3474. !   prsub="s%^prefix\\([     ]*\\)=\\([     ]*\\).*$%prefix\\1=\\2$prefix%"
  3475. ! fi
  3476. ! if test -n "$exec_prefix"; then
  3477. !   prsub="$prsub
  3478. ! s%^exec_prefix\\([     ]*\\)=\\([     ]*\\).*$%exec_prefix\\1=\\2$exec_prefix%"
  3479. ! fi
  3480. ! # Quote sed substitution magic chars in DEFS.
  3481. ! cat >conftest.def <<EOF
  3482. ! $DEFS
  3483. ! EOF
  3484. ! escape_ampersand_and_backslash='s%[&\\]%\\&%g'
  3485. ! DEFS=`sed "$escape_ampersand_and_backslash" <conftest.def`
  3486. ! rm -f conftest.def
  3487. ! # Substitute for predefined variables.
  3488. ! trap 'rm -f config.status; exit 1' 1 3 15
  3489. ! echo creating config.status
  3490. ! rm -f config.status
  3491. ! cat > config.status <<EOF
  3492.   #!/bin/sh
  3493.   # Generated automatically by configure.
  3494. --- 2079,2212 ----
  3495.   
  3496.   
  3497. ! echo $ac_n "checking for small TeX""... $ac_c" 1>&4
  3498. ! cat > conftest.$ac_ext <<EOF
  3499. ! #line 2084 "configure"
  3500.   #include "confdefs.h"
  3501.   #include "$srcdir/lib/c-auto.h.in"
  3502. ! #ifdef SMALLTeX
  3503. !   yes
  3504.   #endif
  3505.   
  3506.   EOF
  3507. ! if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  3508. !   egrep "yes" >/dev/null 2>&1; then
  3509.     rm -rf conftest*
  3510. !   SMALLTeX=yes
  3511. ! else
  3512. !   rm -rf conftest*
  3513. !   SMALLTeX=no
  3514.   fi
  3515.   rm -f conftest*
  3516. ! echo "$ac_t""$SMALLTeX" 1>&4
  3517. ! if test $SMALLTeX = yes; then
  3518.     (cd $srcdir/tex && rm -f ctex.ch && sed -f small.sed <tex.ch >ctex.ch)
  3519. !   cat >> confdefs.h <<\EOF
  3520. ! #define GLUERATIO_TYPE float
  3521. ! EOF
  3522.   
  3523.   fi
  3524.   
  3525. ! echo $ac_n "checking for small MF""... $ac_c" 1>&4
  3526. ! cat > conftest.$ac_ext <<EOF
  3527. ! #line 2113 "configure"
  3528.   #include "confdefs.h"
  3529.   #include "$srcdir/lib/c-auto.h.in"
  3530. ! #ifdef SMALLMF
  3531. !   yes
  3532.   #endif
  3533.   
  3534.   EOF
  3535. ! if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  3536. !   egrep "yes" >/dev/null 2>&1; then
  3537.     rm -rf conftest*
  3538. !   SMALLMF=yes
  3539. ! else
  3540. !   rm -rf conftest*
  3541. !   SMALLMF=no
  3542.   fi
  3543.   rm -f conftest*
  3544. ! echo "$ac_t""$SMALLMF" 1>&4
  3545. ! if test $SMALLMF = yes; then
  3546.     (cd $srcdir/mf && rm -f cmf.ch && sed -f small.sed <mf.ch >cmf.ch)
  3547.   fi
  3548.   
  3549. ! echo $ac_n "checking for small BibTeX""... $ac_c" 1>&4
  3550. ! cat > conftest.$ac_ext <<EOF
  3551. ! #line 2138 "configure"
  3552.   #include "confdefs.h"
  3553.   #include "$srcdir/lib/c-auto.h.in"
  3554. ! #ifdef SMALLBibTeX
  3555. !   yes
  3556.   #endif
  3557.   
  3558.   EOF
  3559. ! if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  3560. !   egrep "yes" >/dev/null 2>&1; then
  3561.     rm -rf conftest*
  3562. !   SMALLBibTeX=yes
  3563. ! else
  3564. !   rm -rf conftest*
  3565. !   SMALLBibTeX=no
  3566.   fi
  3567.   rm -f conftest*
  3568. ! echo "$ac_t""$SMALLBibTeX" 1>&4
  3569. ! if test $SMALLBibTeX = yes; then
  3570.     (cd $srcdir/bibtex \
  3571.      && rm -f cbibtex.ch && sed -f small.sed <bibtex.ch >cbibtex.ch)
  3572.   fi
  3573.   
  3574. ! trap '' 1 2 15
  3575. ! if test -w $cache_file; then
  3576. ! echo "updating cache $cache_file"
  3577. ! cat > $cache_file <<\EOF
  3578. ! # This file is a shell script that caches the results of configure
  3579. ! # tests run on this system so they can be shared between configure
  3580. ! # scripts and configure runs.  It is not useful on other systems.
  3581. ! # If it contains results you don't want to keep, you may remove or edit it.
  3582. ! #
  3583. ! # By default, configure uses ./config.cache as the cache file,
  3584. ! # creating it if it does not exist already.  You can give configure
  3585. ! # the --cache-file=FILE option to use a different cache file; that is
  3586. ! # what configure does when it calls configure scripts in
  3587. ! # subdirectories, so they share the cache.
  3588. ! # Giving --cache-file=/dev/null disables caching, for debugging configure.
  3589. ! # config.status only pays attention to the cache file if you give it the
  3590. ! # --recheck option to rerun configure.
  3591. ! #
  3592. ! EOF
  3593. ! # Ultrix sh set writes to stderr and can't be redirected directly.
  3594. ! (set) 2>&1 |
  3595. !   sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/: \${\1='\2'}/p" \
  3596. !   >> $cache_file
  3597. ! else
  3598. ! echo "not updating unwritable cache $cache_file"
  3599. ! fi
  3600. ! trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
  3601. ! test "x$prefix" = xNONE && prefix=$ac_default_prefix
  3602. ! # Let make expand exec_prefix.
  3603. ! test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  3604. ! # Any assignment to VPATH causes Sun make to only execute
  3605. ! # the first set of double-colon rules, so remove it if not needed.
  3606. ! # If there is a colon in the path, we need to keep it.
  3607. ! if test "x$srcdir" = x.; then
  3608. !   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  3609. ! fi
  3610. ! trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  3611. ! DEFS=-DHAVE_CONFIG_H
  3612. ! # Without the "./", some shells look in PATH for config.status.
  3613. ! : ${CONFIG_STATUS=./config.status}
  3614. ! echo creating $CONFIG_STATUS
  3615. ! rm -f $CONFIG_STATUS
  3616. ! cat > $CONFIG_STATUS <<EOF
  3617.   #!/bin/sh
  3618.   # Generated automatically by configure.
  3619. ***************
  3620. *** 1319,1386 ****
  3621.   # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  3622.   #
  3623. ! # $0 $configure_args
  3624.   
  3625. ! for arg
  3626.   do
  3627. !   case "\$arg" in
  3628. !     -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  3629. !     echo running \${CONFIG_SHELL-/bin/sh} $0 $configure_args
  3630. !     exec \${CONFIG_SHELL-/bin/sh} $0 $configure_args ;;
  3631. !     *) echo "Usage: config.status --recheck" 2>&1; exit 1 ;;
  3632.     esac
  3633.   done
  3634.   
  3635.   trap 'rm -fr Makefile bibtex/Makefile dviutil/Makefile fontutil/Makefile \
  3636.   lib/Makefile man/Makefile mf/Makefile mf/MFwindow/Makefile \
  3637. ! tex/Makefile web/Makefile web2c/Makefile lib/c-auto.h conftest*; exit 1' 1 3 15
  3638. ! CC='$CC'
  3639. ! CPP='$CPP'
  3640. ! INSTALL='$INSTALL'
  3641. ! INSTALL_PROGRAM='$INSTALL_PROGRAM'
  3642. ! INSTALL_DATA='$INSTALL_DATA'
  3643. ! RANLIB='$RANLIB'
  3644. ! YACC='$YACC'
  3645. ! LEX='$LEX'
  3646. ! LEXLIB='$LEXLIB'
  3647. ! LN_S='$LN_S'
  3648. ! LEX_OUTPUT_ROOT='$LEX_OUTPUT_ROOT'
  3649. ! x_include_flags='$x_include_flags'
  3650. ! x_lib_flags='$x_lib_flags'
  3651. ! x_extra_libs='$x_extra_libs'
  3652. ! wlibs='$wlibs'
  3653. ! LIBS='$LIBS'
  3654. ! srcdir='$srcdir'
  3655. ! prefix='$prefix'
  3656. ! exec_prefix='$exec_prefix'
  3657. ! prsub='$prsub'
  3658. ! extrasub='$extrasub'
  3659. ! EOF
  3660. ! cat >> config.status <<\EOF
  3661.   
  3662. ! top_srcdir=$srcdir
  3663. ! CONFIG_FILES=${CONFIG_FILES-"Makefile bibtex/Makefile dviutil/Makefile fontutil/Makefile \
  3664. ! lib/Makefile man/Makefile mf/Makefile mf/MFwindow/Makefile \
  3665. ! tex/Makefile web/Makefile web2c/Makefile"}
  3666. ! for file in .. ${CONFIG_FILES}; do if test "x$file" != x..; then
  3667. !   srcdir=$top_srcdir
  3668. !   # Remove last slash and all that follows it.  Not all systems have dirname.
  3669. !   dir=`echo $file|sed 's%/[^/][^/]*$%%'`
  3670. !   if test "$dir" != "$file"; then
  3671. !     test "$top_srcdir" != . && srcdir=$top_srcdir/$dir
  3672. !     test ! -d $dir && mkdir $dir
  3673. !   fi
  3674. !   echo creating $file
  3675. !   rm -f $file
  3676. !   echo "# Generated automatically from `echo $file|sed 's|.*/||'`.in by configure." > $file
  3677. !   sed -e "
  3678. ! $prsub
  3679.   $extrasub
  3680.   s%@CC@%$CC%g
  3681. - s%@CPP@%$CPP%g
  3682. - s%@INSTALL@%$INSTALL%g
  3683.   s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  3684.   s%@INSTALL_DATA@%$INSTALL_DATA%g
  3685.   s%@RANLIB@%$RANLIB%g
  3686.   s%@YACC@%$YACC%g
  3687.   s%@LEX@%$LEX%g
  3688. --- 2215,2266 ----
  3689.   # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  3690.   #
  3691. ! # $0 $ac_configure_args
  3692. ! #
  3693. ! # Compiler output produced by configure, useful for debugging
  3694. ! # configure, is in ./config.log if it exists.
  3695.   
  3696. ! ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  3697. ! for ac_option
  3698.   do
  3699. !   case "\$ac_option" in
  3700. !   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  3701. !     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  3702. !     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  3703. !   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  3704. !     echo "$CONFIG_STATUS generated by autoconf version 2.1"
  3705. !     exit 0 ;;
  3706. !   -help | --help | --hel | --he | --h)
  3707. !     echo "\$ac_cs_usage"; exit 0 ;;
  3708. !   *) echo "\$ac_cs_usage"; exit 1 ;;
  3709.     esac
  3710.   done
  3711.   
  3712. + ac_given_srcdir=$srcdir
  3713. + ac_given_INSTALL="$INSTALL"
  3714.   trap 'rm -fr Makefile bibtex/Makefile dviutil/Makefile fontutil/Makefile \
  3715.   lib/Makefile man/Makefile mf/Makefile mf/MFwindow/Makefile \
  3716. ! tex/Makefile web/Makefile web2c/Makefile lib/c-auto.h conftest*; exit 1' 1 2 15
  3717.   
  3718. ! # Protect against being on the right side of a sed subst in config.status. 
  3719. ! sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g; 
  3720. !  s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
  3721. ! $ac_vpsub
  3722.   $extrasub
  3723. + s%@CFLAGS@%$CFLAGS%g
  3724. + s%@CPPFLAGS@%$CPPFLAGS%g
  3725. + s%@CXXFLAGS@%$CXXFLAGS%g
  3726. + s%@DEFS@%$DEFS%g
  3727. + s%@LDFLAGS@%$LDFLAGS%g
  3728. + s%@LIBS@%$LIBS%g
  3729. + s%@exec_prefix@%$exec_prefix%g
  3730. + s%@prefix@%$prefix%g
  3731. + s%@program_transform_name@%$program_transform_name%g
  3732. + s%@SET_MAKE@%$SET_MAKE%g
  3733.   s%@CC@%$CC%g
  3734.   s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  3735.   s%@INSTALL_DATA@%$INSTALL_DATA%g
  3736.   s%@RANLIB@%$RANLIB%g
  3737. + s%@CPP@%$CPP%g
  3738.   s%@YACC@%$YACC%g
  3739.   s%@LEX@%$LEX%g
  3740. ***************
  3741. *** 1388,1493 ****
  3742.   s%@LN_S@%$LN_S%g
  3743.   s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
  3744. ! s%@x_include_flags@%$x_include_flags%g
  3745. ! s%@x_lib_flags@%$x_lib_flags%g
  3746. ! s%@x_extra_libs@%$x_extra_libs%g
  3747.   s%@wlibs@%$wlibs%g
  3748. ! s%@LIBS@%$LIBS%g
  3749.   s%@srcdir@%$srcdir%g
  3750. ! s%@DEFS@%-DHAVE_CONFIG_H%" $top_srcdir/${file}.in >> $file
  3751.   fi; done
  3752.   
  3753.   CONFIG_HEADERS=${CONFIG_HEADERS-"lib/c-auto.h"}
  3754. ! for file in .. ${CONFIG_HEADERS}; do if test "x$file" != x..; then
  3755. ! echo creating $file
  3756.   
  3757. - # These sed commands are put into SEDDEFS when defining a macro.
  3758. - # They are broken into pieces to make the sed script easier to manage.
  3759. - # They are passed to sed as "A NAME B NAME C VALUE D", where NAME
  3760. - # is the cpp macro being defined and VALUE is the value it is being given.
  3761. - # Each defining turns into a single global substitution command.
  3762. - #
  3763. - # SEDd sets the value in "#define NAME VALUE" lines.
  3764. - SEDdA='s@^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  3765. - SEDdB='\([     ][     ]*\)[^     ]*@\1#\2'
  3766. - SEDdC='\3'
  3767. - SEDdD='@g'
  3768. - # SEDu turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  3769. - SEDuA='s@^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  3770. - SEDuB='\([     ]\)@\1#\2define\3'
  3771. - SEDuC=' '
  3772. - SEDuD='\4@g'
  3773. - # SEDe turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  3774. - SEDeA='s@^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  3775. - SEDeB='$@\1#\2define\3'
  3776. - SEDeC=' '
  3777. - SEDeD='@g'
  3778. - rm -f conftest.sed
  3779. - EOF
  3780. - # Turn off quoting long enough to insert the sed commands.
  3781. - rm -f conftest.sh
  3782. - cat > conftest.sh <<EOF
  3783. - $SEDDEFS
  3784.   EOF
  3785.   
  3786. ! # Break up $SEDDEFS (now in conftest.sh) because some shells have a limit
  3787. ! # on the size of here documents.
  3788.   
  3789.   # Maximum number of lines to put in a single here document.
  3790. ! maxshlines=9
  3791.   
  3792.   while :
  3793.   do
  3794. !   # wc gives bogus results for an empty file on some systems.
  3795. !   lines=`grep -c . conftest.sh`
  3796. !   if test -z "$lines" || test "$lines" -eq 0; then break; fi
  3797. !   rm -f conftest.s1 conftest.s2
  3798. !   sed ${maxshlines}q conftest.sh > conftest.s1 # Like head -20.
  3799. !   sed 1,${maxshlines}d conftest.sh > conftest.s2 # Like tail +21.
  3800. !   # Write a limited-size here document to append to conftest.sed.
  3801. !   echo 'cat >> conftest.sed <<CONFEOF' >> config.status
  3802. !   cat conftest.s1 >> config.status
  3803. !   echo 'CONFEOF' >> config.status
  3804. !   rm -f conftest.s1 conftest.sh
  3805. !   mv conftest.s2 conftest.sh
  3806.   done
  3807. ! rm -f conftest.sh
  3808.   
  3809. ! # Now back to your regularly scheduled config.status.
  3810. ! cat >> config.status <<\EOF
  3811. ! # This sed command replaces #undef's with comments.  This is necessary, for
  3812. ! # example, in the case of _POSIX_SOURCE, which is predefined and required
  3813. ! # on some systems where configure will not decide to define it in
  3814. ! # lib/c-auto.h.
  3815. ! cat >> conftest.sed <<\CONFEOF
  3816. ! s,^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
  3817. ! CONFEOF
  3818. ! rm -f conftest.h
  3819. ! # Break up the sed commands because old seds have small limits.
  3820. ! maxsedlines=20
  3821. ! cp $top_srcdir/$file.in conftest.h1
  3822. ! while :
  3823. ! do
  3824. !   lines=`grep -c . conftest.sed`
  3825. !   if test -z "$lines" || test "$lines" -eq 0; then break; fi
  3826. !   rm -f conftest.s1 conftest.s2 conftest.h2
  3827. !   sed ${maxsedlines}q conftest.sed > conftest.s1 # Like head -20.
  3828. !   sed 1,${maxsedlines}d conftest.sed > conftest.s2 # Like tail +21.
  3829. !   sed -f conftest.s1 < conftest.h1 > conftest.h2
  3830. !   rm -f conftest.s1 conftest.h1 conftest.sed
  3831. !   mv conftest.h2 conftest.h1
  3832. !   mv conftest.s2 conftest.sed
  3833. ! done
  3834. ! rm -f conftest.sed conftest.h
  3835. ! echo "/* $file.  Generated automatically by configure.  */" > conftest.h
  3836. ! cat conftest.h1 >> conftest.h
  3837. ! rm -f conftest.h1
  3838. ! if cmp -s $file conftest.h 2>/dev/null; then
  3839. !   # The file exists and we would not be changing it.
  3840. !   echo "$file is unchanged"
  3841. !   rm -f conftest.h
  3842. ! else
  3843. !   rm -f $file
  3844. !   mv conftest.h $file
  3845. ! fi
  3846.   fi; done
  3847.   
  3848. --- 2268,2458 ----
  3849.   s%@LN_S@%$LN_S%g
  3850.   s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
  3851. ! s%@X_CFLAGS@%$X_CFLAGS%g
  3852. ! s%@X_PRE_LIBS@%$X_PRE_LIBS%g
  3853. ! s%@X_LIBS@%$X_LIBS%g
  3854. ! s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
  3855.   s%@wlibs@%$wlibs%g
  3856. ! CEOF
  3857. ! EOF
  3858. ! cat >> $CONFIG_STATUS <<EOF
  3859. ! CONFIG_FILES=\${CONFIG_FILES-"Makefile bibtex/Makefile dviutil/Makefile fontutil/Makefile \
  3860. ! lib/Makefile man/Makefile mf/Makefile mf/MFwindow/Makefile \
  3861. ! tex/Makefile web/Makefile web2c/Makefile"}
  3862. ! EOF
  3863. ! cat >> $CONFIG_STATUS <<\EOF
  3864. ! for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  3865. !   # Support "outfile[:infile]", defaulting infile="outfile.in".
  3866. !   case "$ac_file" in
  3867. !   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  3868. !        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  3869. !   *) ac_file_in="${ac_file}.in" ;;
  3870. !   esac
  3871. !   # Adjust relative srcdir, etc. for subdirectories.
  3872. !   # Remove last slash and all that follows it.  Not all systems have dirname.
  3873. !   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  3874. !   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  3875. !     # The file is in a subdirectory.
  3876. !     test ! -d "$ac_dir" && mkdir "$ac_dir"
  3877. !     ac_dir_suffix="/$ac_dir"
  3878. !     # A "../" for each directory in $ac_dir_suffix.
  3879. !     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  3880. !   else
  3881. !     ac_dir_suffix= ac_dots=
  3882. !   fi
  3883. !   case "$ac_given_srcdir" in
  3884. !   .)  srcdir=.
  3885. !       if test -z "$ac_dots"; then top_srcdir=.
  3886. !       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  3887. !   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  3888. !   *) # Relative path.
  3889. !     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  3890. !     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  3891. !   esac
  3892. !   case "$ac_given_INSTALL" in
  3893. !   [/$]*) INSTALL="$ac_given_INSTALL" ;;
  3894. !   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  3895. !   esac
  3896. !   echo creating "$ac_file"
  3897. !   rm -f "$ac_file"
  3898. !   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  3899. !   case "$ac_file" in
  3900. !   *Makefile*) ac_comsub="1i\\
  3901. ! # $configure_input" ;;
  3902. !   *) ac_comsub= ;;
  3903. !   esac
  3904. !   # Replace lines of the form ac_include foo with the contents of foo:
  3905. !   # first, from the ac_include lines construct a list of sed
  3906. !   # commands to remove them, and include the files; then run sed.
  3907. !   # Have to use sed because old (Ultrix, SunOS) awk does not support
  3908. !   # getline or system. (Anyway, configure scripts aren't supposed to use awk.)
  3909. !   # Use \@...@<cmd> form of sed address because the filename may contain /.
  3910. !   # Can't use only one -e and commands {dr foo} because foo has to be last.
  3911. !   # Use @e initially instead of -e because GNU echo has a -e option.
  3912. !   # USe `X' to mean a bunch of backslashes; this is for FreeBSD.
  3913. !   file_substs=`sed -n \
  3914. ! "/^ac_include/s%ac_include[     ]*\(.*\)%@e 'X@^&@r \1' -e 'X@^&@d'%p" \
  3915. !                $ac_given_srcdir/${ac_file}.in`
  3916. !   if test -n "$file_substs"; then
  3917. !     # Change @e back to -e and X@^ to \@^.
  3918. !     file_subst_cmd="sed `echo $file_substs \
  3919. !                          | sed -e 's/@e/-e/g' -e 's/X@^/\\\\\@^/g'`"
  3920. !   else
  3921. !     # If no substitutions and hence no sed commands, don't choke.
  3922. !     file_subst_cmd=cat
  3923. !   fi
  3924. !   # cd into the srcdir because the files being included more or less
  3925. !   # must be part of the distribution. I can't find any way to do
  3926. !   # variable substitution in the sed commands (so the user could have,
  3927. !   # e.g., $top_srcdir in their ac_include line).
  3928. !   (cd $ac_given_srcdir && eval $file_subst_cmd ${ac_file}.in) \
  3929. !   | sed -e "$ac_comsub
  3930. ! s%@configure_input@%$configure_input%g
  3931.   s%@srcdir@%$srcdir%g
  3932. ! s%@top_srcdir@%$top_srcdir%g
  3933. ! s%@INSTALL@%$INSTALL%g
  3934. ! " -f conftest.subs > $ac_file
  3935.   fi; done
  3936. + rm -f conftest.subs
  3937. + # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  3938. + # NAME is the cpp macro being defined and VALUE is the value it is being given.
  3939. + #
  3940. + # ac_d sets the value in "#define NAME VALUE" lines.
  3941. + ac_dA='s%^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  3942. + ac_dB='\([     ][     ]*\)[^     ]*%\1#\2'
  3943. + ac_dC='\3'
  3944. + ac_dD='%g'
  3945. + # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  3946. + ac_uA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  3947. + ac_uB='\([     ]\)%\1#\2define\3'
  3948. + ac_uC=' '
  3949. + ac_uD='\4%g'
  3950. + # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  3951. + ac_eA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  3952. + ac_eB='$%\1#\2define\3'
  3953. + ac_eC=' '
  3954. + ac_eD='%g'
  3955.   
  3956.   CONFIG_HEADERS=${CONFIG_HEADERS-"lib/c-auto.h"}
  3957. ! for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  3958. !   # Support "outfile[:infile]", defaulting infile="outfile.in".
  3959. !   case "$ac_file" in
  3960. !   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  3961. !        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  3962. !   *) ac_file_in="${ac_file}.in" ;;
  3963. !   esac
  3964. !   echo creating $ac_file
  3965. !   rm -f conftest.frag conftest.in conftest.out
  3966. !   cp $ac_given_srcdir/$ac_file_in conftest.in
  3967.   
  3968.   EOF
  3969.   
  3970. ! # Transform confdefs.h into a sed script conftest.vals that substitutes
  3971. ! # the proper values into config.h.in to produce config.h.  And first:
  3972. ! # Protect against being on the right side of a sed subst in config.status. 
  3973. ! # Protect against being in an unquoted here document in config.status.
  3974. ! rm -f conftest.vals
  3975. ! cat > conftest.hdr <<\EOF
  3976. ! s/[\\&%]/\\&/g
  3977. ! s%[\\$`]%\\&%g
  3978. ! s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  3979. ! s%ac_d%ac_u%gp
  3980. ! s%ac_u%ac_e%gp
  3981. ! EOF
  3982. ! sed -n -f conftest.hdr confdefs.h > conftest.vals
  3983. ! rm -f conftest.hdr
  3984. ! # This sed command replaces #undef with comments.  This is necessary, for
  3985. ! # example, in the case of _POSIX_SOURCE, which is predefined and required
  3986. ! # on some systems where configure will not decide to define it.
  3987. ! cat >> conftest.vals <<\EOF
  3988. ! s%^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  3989. ! EOF
  3990.   
  3991. + # Break up conftest.vals because some shells have a limit on
  3992. + # the size of here documents, and old seds have small limits too.
  3993.   # Maximum number of lines to put in a single here document.
  3994. ! ac_max_here_lines=12
  3995.   
  3996. + rm -f conftest.tail
  3997.   while :
  3998.   do
  3999. !   ac_lines=`grep -c . conftest.vals`
  4000. !   # grep -c gives empty output for an empty file on some AIX systems.
  4001. !   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  4002. !   # Write a limited-size here document to conftest.frag.
  4003. !   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  4004. !   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  4005. !   echo 'CEOF
  4006. !   sed -f conftest.frag conftest.in > conftest.out
  4007. !   rm -f conftest.in
  4008. !   mv conftest.out conftest.in
  4009. ! ' >> $CONFIG_STATUS
  4010. !   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  4011. !   rm -f conftest.vals
  4012. !   mv conftest.tail conftest.vals
  4013.   done
  4014. ! rm -f conftest.vals
  4015.   
  4016. ! cat >> $CONFIG_STATUS <<\EOF
  4017. !   rm -f conftest.frag conftest.h
  4018. !   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  4019. !   cat conftest.in >> conftest.h
  4020. !   rm -f conftest.in
  4021. !   if cmp -s $ac_file conftest.h 2>/dev/null; then
  4022. !     echo "$ac_file is unchanged"
  4023. !     rm -f conftest.h
  4024. !   else
  4025. !     rm -f $ac_file
  4026. !     mv conftest.h $ac_file
  4027. !   fi
  4028.   fi; done
  4029.   
  4030. ***************
  4031. *** 1496,1500 ****
  4032.   exit 0
  4033.   EOF
  4034. ! chmod +x config.status
  4035. ! ${CONFIG_SHELL-/bin/sh} config.status
  4036.   
  4037. --- 2461,2466 ----
  4038.   exit 0
  4039.   EOF
  4040. ! chmod +x $CONFIG_STATUS
  4041. ! rm -fr confdefs* $ac_clean_files
  4042. ! test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS
  4043.   
  4044. *** web2c/lib/c-auto.h.in.save    Tue Feb  1 12:28:36 1994
  4045. --- web2c/lib/c-auto.h.in    Thu Jan  5 15:05:45 1995
  4046. ***************
  4047. *** 142,145 ****
  4048. --- 142,163 ----
  4049.   /* Define as `float' if making a ``small'' TeX.  */
  4050.   #undef GLUERATIO_TYPE
  4051. + /* Define if your putenv doesn't waste space when the same environment
  4052. +    variable is assigned more than once, with different (malloced)
  4053. +    values.  This is true only on NetBSD/FreeBSD, as far as I know. See
  4054. +    xputenv.c.  */
  4055. + #undef SMART_PUTENV
  4056. + /* Define if you are using GNU libc or otherwise have global variables
  4057. +    `program_invocation_name' and `program_invocation_short_name'.  */
  4058. + #undef HAVE_PROGRAM_INVOCATION_NAME
  4059. + /* Define if you get clashes concerning wchar_t, between X's include
  4060. +    files and system includes.  */
  4061. + #undef FOIL_X_WCHAR_T
  4062. + /* Define if you have SIGIO, F_SETOWN, and FASYNC.  */
  4063. + #undef HAVE_SIGIO
  4064.   /* Below here generated by autoheader.  */
  4065.   /* c-auto.h.in.  Generated automatically from configure.in by autoheader.  */
  4066. ***************
  4067. *** 148,166 ****
  4068.   #undef __CHAR_UNSIGNED__
  4069.   
  4070.   /* Define to empty if the keyword does not work.  */
  4071.   #undef const
  4072.   
  4073. - /* Define as the proper declaration for yytext.  */
  4074. - #undef DECLARE_YYTEXT
  4075. - /* Define if you have dirent.h.  */
  4076. - #undef DIRENT
  4077.   /* Define if long int is 64 bits.  */
  4078.   #undef LONG_64_BITS
  4079.   
  4080. - /* Define if you don't have dirent.h, but have ndir.h.  */
  4081. - #undef NDIR
  4082.   /* Define if you need to in order for stat and other things to work.  */
  4083.   #undef _POSIX_SOURCE
  4084. --- 166,178 ----
  4085.   #undef __CHAR_UNSIGNED__
  4086.   
  4087. + /* Define if the closedir function returns void instead of int.  */
  4088. + #undef CLOSEDIR_VOID
  4089.   /* Define to empty if the keyword does not work.  */
  4090.   #undef const
  4091.   
  4092.   /* Define if long int is 64 bits.  */
  4093.   #undef LONG_64_BITS
  4094.   
  4095.   /* Define if you need to in order for stat and other things to work.  */
  4096.   #undef _POSIX_SOURCE
  4097. ***************
  4098. *** 172,192 ****
  4099.   #undef STDC_HEADERS
  4100.   
  4101. - /* Define if you don't have dirent.h, but have sys/dir.h.  */
  4102. - #undef SYSDIR
  4103. - /* Define if you don't have dirent.h, but have sys/ndir.h.  */
  4104. - #undef SYSNDIR
  4105. - /* Define if the closedir function returns void instead of int.  */
  4106. - #undef VOID_CLOSEDIR
  4107.   /* Define if your processor stores words with the most significant
  4108.      byte first (like Motorola and SPARC, unlike Intel and VAX).  */
  4109.   #undef WORDS_BIGENDIAN
  4110.   
  4111. ! /* Define if you have memmove.  */
  4112.   #undef HAVE_MEMMOVE
  4113.   
  4114. ! /* Define if you have putenv.  */
  4115.   #undef HAVE_PUTENV
  4116.   
  4117. --- 184,204 ----
  4118.   #undef STDC_HEADERS
  4119.   
  4120.   /* Define if your processor stores words with the most significant
  4121.      byte first (like Motorola and SPARC, unlike Intel and VAX).  */
  4122.   #undef WORDS_BIGENDIAN
  4123.   
  4124. ! /* Define if lex declares yytext as a char * by default, not a char[].  */
  4125. ! #undef YYTEXT_POINTER
  4126. ! /* Define if you have the basename function.  */
  4127. ! #undef HAVE_BASENAME
  4128. ! /* Define if you have the bcopy function.  */
  4129. ! #undef HAVE_BCOPY
  4130. ! /* Define if you have the memmove function.  */
  4131.   #undef HAVE_MEMMOVE
  4132.   
  4133. ! /* Define if you have the putenv function.  */
  4134.   #undef HAVE_PUTENV
  4135.   
  4136. ***************
  4137. *** 194,197 ****
  4138. --- 206,212 ----
  4139.   #undef HAVE_ASSERT_H
  4140.   
  4141. + /* Define if you have the <dirent.h> header file.  */
  4142. + #undef HAVE_DIRENT_H
  4143.   /* Define if you have the <float.h> header file.  */
  4144.   #undef HAVE_FLOAT_H
  4145. ***************
  4146. *** 203,206 ****
  4147. --- 218,224 ----
  4148.   #undef HAVE_MEMORY_H
  4149.   
  4150. + /* Define if you have the <ndir.h> header file.  */
  4151. + #undef HAVE_NDIR_H
  4152.   /* Define if you have the <pwd.h> header file.  */
  4153.   #undef HAVE_PWD_H
  4154. ***************
  4155. *** 212,233 ****
  4156.   #undef HAVE_STRING_H
  4157.   
  4158. ! /* Define if you have the <unistd.h> header file.  */
  4159. ! #undef HAVE_UNISTD_H
  4160. ! /* Define if you have the Xext library (-lXext).  */
  4161. ! #undef HAVE_LIBXEXT
  4162. ! /* Define if you have the Xt library (-lXt).  */
  4163. ! #undef HAVE_LIBXT
  4164.   
  4165. ! /* Define if you have the dnet library (-ldnet).  */
  4166. ! #undef HAVE_LIBDNET
  4167.   
  4168. ! /* Define if you have the dnet_stub library (-ldnet_stub).  */
  4169. ! #undef HAVE_LIBDNET_STUB
  4170. ! /* Define if you have the fl library (-lfl).  */
  4171. ! #undef HAVE_LIBFL
  4172.   
  4173. ! /* Define if you have the socket library (-lsocket).  */
  4174. ! #undef HAVE_LIBSOCKET
  4175. --- 230,246 ----
  4176.   #undef HAVE_STRING_H
  4177.   
  4178. ! /* Define if you have the <sys/dir.h> header file.  */
  4179. ! #undef HAVE_SYS_DIR_H
  4180.   
  4181. ! /* Define if you have the <sys/ndir.h> header file.  */
  4182. ! #undef HAVE_SYS_NDIR_H
  4183.   
  4184. ! /* Define if you have the <unistd.h> header file.  */
  4185. ! #undef HAVE_UNISTD_H
  4186.   
  4187. ! /* Retrofit needed by the sources, which still use DECLARE_YYTEXT.  */
  4188. ! #if YYTEXT_POINTER
  4189. ! #define DECLARE_YYTEXT extern char *yytext;
  4190. ! #else
  4191. ! #define DECLARE_YYTEXT extern char yytext[];
  4192. ! #endif
  4193. *** web2c/lib/main.c.save    Tue May 25 11:41:19 1993
  4194. --- web2c/lib/main.c    Fri Sep 23 15:48:40 1994
  4195. ***************
  4196. *** 28,31 ****
  4197. --- 28,32 ----
  4198.     argc = ac;
  4199.     gargv = av;
  4200. +   kpse_set_progname(av[0]);
  4201.     main_body ();
  4202.     return EXIT_SUCCESS;
  4203. *** web2c/lib/openinout.c.save    Sat Dec  4 13:01:52 1993
  4204. --- web2c/lib/openinout.c    Wed Sep 28 16:26:41 1994
  4205. ***************
  4206. *** 125,128 ****
  4207. --- 125,131 ----
  4208.       kpse_file_format_type format;
  4209.   {
  4210. +   static boolean kpathsea_dpi_set = 0;
  4211. +   static boolean maketex_base_dpi_set = 0;
  4212.     string found;
  4213.     /* Since & is a no-op when applied to an array, we must put the
  4214. ***************
  4215. *** 130,133 ****
  4216. --- 133,149 ----
  4217.     string name = nameoffile;
  4218.     
  4219. +   if (!kpathsea_dpi_set)
  4220. +     {
  4221. +       if (!getenv ("KPATHSEA_DPI"))
  4222. +     xputenv_int ("KPATHSEA_DPI", 300);
  4223. +       kpathsea_dpi_set = 1;
  4224. +     }
  4225. +   if (!maketex_base_dpi_set)
  4226. +     {
  4227. +       if (!getenv ("MAKETEX_BASE_DPI"))
  4228. +     xputenv_int ("MAKETEX_BASE_DPI", 300);
  4229. +       maketex_base_dpi_set = 1;
  4230. +     }
  4231.     make_c_string (&name);
  4232.     found = kpse_make_tex (format, name);
  4233. *** web2c/lib/ourpaths.c.save    Sun Dec  5 12:48:44 1993
  4234. --- web2c/lib/ourpaths.c    Fri Oct 28 21:42:19 1994
  4235. ***************
  4236. *** 3,14 ****
  4237.   #include "config.h"
  4238.   
  4239. ! #include <kpathsea/filefmt.h>
  4240.   #include <kpathsea/fontmap.h>
  4241.   #include <kpathsea/pathsearch.h>
  4242.   
  4243.   /* `path_dirs' is initialized in `setpaths', to a null-terminated array
  4244.      of directories to search for.  */
  4245. ! static string path_dirs[LAST_PATH];
  4246.   
  4247.   
  4248. --- 3,17 ----
  4249.   #include "config.h"
  4250.   
  4251. ! #include <kpathsea/cnf.h>
  4252. ! #include <kpathsea/default.h>
  4253. ! #include <kpathsea/expand.h>
  4254.   #include <kpathsea/fontmap.h>
  4255. + #include <kpathsea/paths.h>
  4256.   #include <kpathsea/pathsearch.h>
  4257. ! #include <kpathsea/tex-file.h>
  4258.   
  4259.   /* `path_dirs' is initialized in `setpaths', to a null-terminated array
  4260.      of directories to search for.  */
  4261. ! static const_string path_dirs[LAST_PATH];
  4262.   
  4263.   
  4264. ***************
  4265. *** 23,60 ****
  4266.   {
  4267.     if (path_bits & BIBINPUTPATHBIT)
  4268. !     path_dirs[BIBINPUTPATH] = KPSE_BIB_PATH ();
  4269.   
  4270.     if (path_bits & BSTINPUTPATHBIT)
  4271. !     path_dirs[BSTINPUTPATH] = KPSE_BST_PATH ();
  4272.   
  4273.     if (path_bits & GFFILEPATHBIT)
  4274. !     path_dirs[GFFILEPATH] = KPSE_GF_PATH ();
  4275.   
  4276.     if (path_bits & MFBASEPATHBIT)
  4277. !     path_dirs[MFBASEPATH] = KPSE_BASE_PATH ();
  4278.   
  4279.     if (path_bits & MFINPUTPATHBIT)
  4280. !     path_dirs[MFINPUTPATH] = KPSE_MF_PATH ();
  4281.   
  4282.     if (path_bits & MFPOOLPATHBIT)
  4283. !     path_dirs[MFPOOLPATH] = KPSE_MFPOOL_PATH ();
  4284.   
  4285.     if (path_bits & PKFILEPATHBIT)
  4286. !     path_dirs[PKFILEPATH] = KPSE_PK_PATH ();
  4287.   
  4288.     if (path_bits & TEXFORMATPATHBIT)
  4289. !     path_dirs[TEXFORMATPATH] = KPSE_FMT_PATH ();
  4290.   
  4291.     if (path_bits & TEXINPUTPATHBIT)
  4292. !     path_dirs[TEXINPUTPATH] = KPSE_TEX_PATH ();
  4293.   
  4294.     if (path_bits & TEXPOOLPATHBIT)
  4295. !     path_dirs[TEXPOOLPATH] = KPSE_TEXPOOL_PATH ();
  4296.   
  4297.     if (path_bits & TFMFILEPATHBIT)
  4298. !     path_dirs[TFMFILEPATH] = KPSE_TFM_PATH ();
  4299.   
  4300.     if (path_bits & VFFILEPATHBIT)
  4301. !     path_dirs[VFFILEPATH] = KPSE_VF_PATH ();
  4302.   }
  4303.   
  4304. --- 26,63 ----
  4305.   {
  4306.     if (path_bits & BIBINPUTPATHBIT)
  4307. !     path_dirs[BIBINPUTPATH] = kpse_init_format (kpse_bib_format);
  4308.   
  4309.     if (path_bits & BSTINPUTPATHBIT)
  4310. !     path_dirs[BSTINPUTPATH] = kpse_init_format (kpse_bst_format);
  4311.   
  4312.     if (path_bits & GFFILEPATHBIT)
  4313. !     path_dirs[GFFILEPATH] = kpse_init_format (kpse_gf_format);
  4314.   
  4315.     if (path_bits & MFBASEPATHBIT)
  4316. !     path_dirs[MFBASEPATH] = kpse_init_format (kpse_base_format);
  4317.   
  4318.     if (path_bits & MFINPUTPATHBIT)
  4319. !     path_dirs[MFINPUTPATH] = kpse_init_format (kpse_mf_format);
  4320.   
  4321.     if (path_bits & MFPOOLPATHBIT)
  4322. !     path_dirs[MFPOOLPATH] = kpse_init_format (kpse_mfpool_format);
  4323.   
  4324.     if (path_bits & PKFILEPATHBIT)
  4325. !     path_dirs[PKFILEPATH] = kpse_init_format (kpse_pk_format);
  4326.   
  4327.     if (path_bits & TEXFORMATPATHBIT)
  4328. !     path_dirs[TEXFORMATPATH] = kpse_init_format (kpse_fmt_format);
  4329.   
  4330.     if (path_bits & TEXINPUTPATHBIT)
  4331. !     path_dirs[TEXINPUTPATH] = kpse_init_format (kpse_tex_format);
  4332.   
  4333.     if (path_bits & TEXPOOLPATHBIT)
  4334. !     path_dirs[TEXPOOLPATH] = kpse_init_format (kpse_texpool_format);
  4335.   
  4336.     if (path_bits & TFMFILEPATHBIT)
  4337. !     path_dirs[TFMFILEPATH] = kpse_init_format (kpse_tfm_format);
  4338.   
  4339.     if (path_bits & VFFILEPATHBIT)
  4340. !     path_dirs[VFFILEPATH] = kpse_init_format (kpse_vf_format);
  4341.   }
  4342.   
  4343. ***************
  4344. *** 72,76 ****
  4345.   {
  4346.     string found;  
  4347. !   string path = path_dirs[path_index];
  4348.     
  4349.     make_c_string (&name);
  4350. --- 75,79 ----
  4351.   {
  4352.     string found;  
  4353. !   const_string path = path_dirs[path_index];
  4354.     
  4355.     make_c_string (&name);
  4356. ***************
  4357. *** 79,83 ****
  4358.        have the dpi available separately, and anyway we don't care about
  4359.        having pktogf run MakeTeXPK, etc.  */
  4360. !   found = kpse_path_search (path, name);
  4361.   
  4362.     /* If we didn't find it, and we're looking for a font, maybe it's
  4363. --- 82,86 ----
  4364.        have the dpi available separately, and anyway we don't care about
  4365.        having pktogf run MakeTeXPK, etc.  */
  4366. !   found = kpse_path_search (path, name, true);
  4367.   
  4368.     /* If we didn't find it, and we're looking for a font, maybe it's
  4369. ***************
  4370. *** 89,96 ****
  4371.       {
  4372.         string *mapped_names;
  4373. !       static map_type fontmap = NULL;
  4374.         
  4375.         /* Fault in the mapping if necessary.  */
  4376. !       if (!fontmap)
  4377.           fontmap = map_create (path);
  4378.         
  4379. --- 92,99 ----
  4380.       {
  4381.         string *mapped_names;
  4382. !       static hash_table_type fontmap = { NULL, 0 };
  4383.         
  4384.         /* Fault in the mapping if necessary.  */
  4385. !       if (fontmap.size == 0)
  4386.           fontmap = map_create (path);
  4387.         
  4388. ***************
  4389. *** 102,106 ****
  4390.             while ((mapped_name = *mapped_names++) && !found)
  4391.               {
  4392. !               found = kpse_path_search (path, mapped_name);
  4393.               }
  4394.           }
  4395. --- 105,109 ----
  4396.             while ((mapped_name = *mapped_names++) && !found)
  4397.               {
  4398. !               found = kpse_path_search (path, mapped_name, true);
  4399.               }
  4400.           }
  4401. *** web2c/lib/texmf.c.save    Sun Dec  5 12:53:01 1993
  4402. --- web2c/lib/texmf.c    Fri Sep 23 22:33:56 1994
  4403. ***************
  4404. *** 33,37 ****
  4405.   #include <kpathsea/c-ctype.h>
  4406.   #include <kpathsea/c-pathch.h>
  4407. ! #include <kpathsea/tex-make.h>
  4408.   
  4409.   /* For `struct tm'.  */
  4410. --- 33,37 ----
  4411.   #include <kpathsea/c-ctype.h>
  4412.   #include <kpathsea/c-pathch.h>
  4413. ! #include <kpathsea/tex-file.h>
  4414.   
  4415.   /* For `struct tm'.  */
  4416. ***************
  4417. *** 74,77 ****
  4418. --- 74,79 ----
  4419.     dump_default_length = strlen (dump_default + 1);
  4420.   
  4421. +   kpse_set_progname(av[0]);
  4422.   #ifndef INI
  4423.     if (readyalready != 314159)
  4424. ***************
  4425. *** 99,103 ****
  4426.                               || getenv ("USE_MAKETEXMF")
  4427.                               || getenv ("MAKETEXMF");
  4428. !     KPSE_MAKE_SPEC_ENABLED (kpse_make_specs[kpse_mf_format]) = use_maketexmf;
  4429.     }
  4430.   #endif /* MF */
  4431. --- 101,105 ----
  4432.                               || getenv ("USE_MAKETEXMF")
  4433.                               || getenv ("MAKETEXMF");
  4434. !     kpse_format_info[kpse_mf_format].program_enabled_p = use_maketexmf;
  4435.     }
  4436.   #endif /* MF */
  4437. ***************
  4438. *** 110,115 ****
  4439.                                || getenv ("USE_MAKETEXTFM")
  4440.                                || getenv ("MAKETEXTFM");
  4441. !     KPSE_MAKE_SPEC_ENABLED (kpse_make_specs[kpse_tex_format]) = use_maketextex;
  4442. !     KPSE_MAKE_SPEC_ENABLED (kpse_make_specs[kpse_tfm_format]) = use_maketextfm;
  4443.     }
  4444.   #endif /* TeX */
  4445. --- 112,117 ----
  4446.                                || getenv ("USE_MAKETEXTFM")
  4447.                                || getenv ("MAKETEXTFM");
  4448. !     kpse_format_info[kpse_tex_format].program_enabled_p = use_maketextex;
  4449. !     kpse_format_info[kpse_tfm_format].program_enabled_p = use_maketextfm;
  4450.     }
  4451.   #endif /* TeX */
  4452. *** web2c/mf/Makefile.in.save    Thu Feb  3 04:48:35 1994
  4453. --- web2c/mf/Makefile.in    Sat Sep 24 02:08:29 1994
  4454. ***************
  4455. *** 46,52 ****
  4456.   libs = $(commono) $(LIBS)
  4457.   
  4458. ! x_include_flags = @x_include_flags@
  4459. ! x_lib_flags = @x_lib_flags@
  4460. ! x_extra_libs = @x_extra_libs@
  4461.   wlibs = @wlibs@
  4462.   LIBS = @LIBS@
  4463. --- 46,52 ----
  4464.   libs = $(commono) $(LIBS)
  4465.   
  4466. ! x_include_flags = @X_CFLAGS@
  4467. ! x_lib_flags = @X_LIBS@
  4468. ! x_extra_libs = @X_EXTRA_LIBS@
  4469.   wlibs = @wlibs@
  4470.   LIBS = @LIBS@
  4471. ***************
  4472. *** 72,77 ****
  4473.   # What to pass to submakes.
  4474.   makeargs=SHELL='$(SHELL)' CC='$(CC)' CFLAGS='$(CFLAGS)' \
  4475. ! LDFLAGS='$(LDFLAGS)' LIBS='$(libs)' RANLIB='$(RANLIB)' LN='$(LN)' \
  4476. ! srcdir=$(srcdir)  
  4477.   
  4478.   
  4479. --- 72,76 ----
  4480.   # What to pass to submakes.
  4481.   makeargs=SHELL='$(SHELL)' CC='$(CC)' CFLAGS='$(CFLAGS)' \
  4482. ! LDFLAGS='$(LDFLAGS)' LIBS='$(libs)' RANLIB='$(RANLIB)' LN='$(LN)'
  4483.   
  4484.   
  4485. -- 
  4486. End of web2c.kpathsea-2.6.help
  4487.